Until I can get access to run your code, see this discussion with the exact same issue:
I think your error is a symptom of something else that isn’t the *goto but, I can’t know for certain until I test the code. Although, double checking the solution, it does imply adding *goto at the very end of each if/else/if before proceeding. I think this is what @LiliArch said earlier.