Works around jruby/jruby#839