Fixed a concurrency issue in JavaProjectReference.
Removed unused import.
Extensions now may use CustomModelQuery (the API is not yet public to 3rd party extensions).