Sounds good, I'm glad to hear that you're figuring out the circumstances for the bug and making a counter for it. Another thought that comes to mind for me is as such; If you try falling to different places in the pit, could you find one that doesn't trigger the bug? Could you choose the next closest pitfall and drop from that one instead? Would any of this keep the bug from happening?...
Your Mainbar: