Fixes bug that caused TeaVM compiler to freeze when compiling a certain
bytecode sequence