Proper fix for modules lazyloader

This fixes #12561