fixes for infinite recursions in AgentValidatorSecondPass
(ModuleCallActions can point to each other, e.g. module A calls module B
and module B calls module A, which caused stackoverflows)