Yes, the major cause of slowness was a bug, that is fixed in Lmod v5.0.1 .

But, it's still important to use the caching mechanism, which is done now, but maybe not 100% like it should yet (because features are missing in Lmod).
It's good enough to be useable in a production environment though.