[JVM] More robust code detection in subsets
[JVM] More robust code detection in subsets

This is a port of https://github.com/rakudo/rakudo/commit/ede507b734
to the jvm backend. Fixes R#1799

labster/rakudo,MasterDuke17/rakudo,salortiz/rakudo,MasterDuke17/rakudo,tony-o/rakudo,rakudo/rakudo,tony-o/rakudo,MasterDuke17/rakudo,lucasbuchala/rakudo,labster/rakudo,labster/rakudo,rakudo/rakudo,softmoth/rakudo,lucasbuchala/rakudo,tbrowder/rakudo,tbrowder/rakudo,MasterDuke17/rakudo,tbrowder/rakudo,salortiz/rakudo,tony-o/rakudo,MasterDuke17/rakudo,tbrowder/rakudo,softmoth/rakudo,tony-o/rakudo,Gnouc/rakudo,labster/rakudo,lucasbuchala/rakudo,Gnouc/rakudo,softmoth/rakudo,MasterDuke17/rakudo,tony-o/rakudo,labster/rakudo,nbrown/rakudo,salortiz/rakudo,lucasbuchala/rakudo,softmoth/rakudo,softmoth/rakudo,Gnouc/rakudo,Gnouc/rakudo,tbrowder/rakudo,nbrown/rakudo,Gnouc/rakudo,nbrown/rakudo,lucasbuchala/rakudo,tony-o/rakudo,rakudo/rakudo,nbrown/rakudo,Gnouc/rakudo,salortiz/rakudo,salortiz/rakudo,labster/rakudo,rakudo/rakudo,nbrown/rakudo,salortiz/rakudo,tbrowder/rakudo,nbrown/rakudo,rakudo/rakudo,rakudo/rakudo