Hi I found a bug in the overlay code, perhaps it might be useful for someone else.
in the initovelay function at the line:
// Enable external interrupt INT0 on pin 2 with falling edge.
EIMSK = _BV(INT0);
EICRA = _BV(ISC11);
ISC11 is actually for INT1 it should be ISC01
So without it the int is set to active low instead of active on falling edge.
This incorrect setting is the reason a frame counter does not work properly in INT0, as the function is called continuously while vsync is low;
Hope this makes sense.