Changes to support jdg DSL querying in library mode