[IR] Fixed bug in IRBuilder deversioning from 9fc17ef9

* Fixes crasher (stack overflow) in language/defined_spec.rb