Workaround for a possible bug in JRuby's RubyHash