Fix undefining merge method for nil:class issue