- // FIXME once BUG-7760 gets fixed, there will be no need for these dirty casts
- final StatementContextBase<?, ?, ?> sourceNodeStmtCtx =
- (StatementContextBase<?, ?, ?>) sourceCtxPrerequisite.resolve(ctx);
- final StatementContextBase<?, ?, ?> targetNodeStmtCtx =
- (StatementContextBase<?, ?, ?>) targetCtxPrerequisite.resolve(ctx);
+ if (!deviateStmtCtx.isSupportedToBuildEffective()) {
+ // We are not building effective model, hence we should not be performing any effects
+ return;
+ }
+
+ final var sourceNodeStmtCtx = sourceCtxPrerequisite.resolve(ctx);
+ final var targetNodeStmtCtx = targetCtxPrerequisite.resolve(ctx);