assert function never returns

This will aid in optimization.
Does same issue exist in toModuleArray?