MPS-17815 Paste java statements doesn't respect position, always inserts at the end of statement list
added assert message in DynamicReference
Should fix NPE in classifiers scope (MPS-17503, MPS-17672)