Fix last if-statement in block codegen

 #KT-3203 Fixed