Proper fix for modules lazyloader

This fixes #12561
Merge branch 'tfix2' into develop