Constraining the use of getJavaElement
Makes legacy locate available again