In the past few months I’ve moved to named functions for any timers/event bindings/callbacks longer than a single statement. Keeps things more manageable in general, and as a bonus, sidesteps this issue.
Spaghetti’s tasty, but belongs on your plate, not your computer.