fix stack level too deep on jruby when using nested.add_link