Yeah, sounds like it needs some minor tweaks...
Phantom Wings, for reference, in Melee you had a 7-frame window RIGHT before you landed to hit L/R, and it halved the lag from an aerial. Many of us seem to agree that given Brawl's defensive options, NO lag would be acceptable to test with.
It sounds like the timer starts when you start attacking, which is not how Melee/SSB64 work at all. If you can't make it based on when you land, could you just remove the input timer altogether?
EDIT: Cero, if you still want to try that code, try
this.