Fixes to be ready for new locations to be added in new versions of JDK