Keeping error reporting as it is is fine with me, I already got used to locating the source of the problem.
Just wanted to clarify that the next-state action is not defined in an instantiated module. It is defined in the main module, but it re-uses actions defined in instantiated modules. The reason I'm re-using the actions in instantiated modules is to make sure they resemble the final API that will be defined and implemented in code.
And yes, my modules are instantiated with substitutions.