There's little reason to use original IOperationContext from GenerationSessionContext.getInvocationContext to obtain origin module.
I don't see a reason to provide access to session's outer context. Context operations, if any, may be delegated to GenerationSessionContext. The only difference between these two contexts is different module (transients for latter vs module of input model).
Do not use RM whereas regular template reference (to a single generated node) is fine.
Regenerated to match updated dependencies of lang.plugin
Report cross-template references as warning - there are legal uses for these references when we know target won't get dropped due to incremental mode.