Merge pull request #1459 from davidfestal/master

Necessary changes to fix bugs in the declaration caching mechanism, in relation to the IDE use cases
Moved argument validation to `initialize()` so any errors get handled properly (see #1454)
Also remove lazy declarations from java source files