Sometimes instead of {POP, GETSTATIC Unit.INSTANCE, ARETURN} sequence the codegen emits {CHECKCAST Unit, ARETURN} sequence, which breaks tail call optimization. By replacing CHECKCAST with ARETURN we eliminate this issue. #KT-19790: Fixed