Fix synchronous loading of modules

Async module loading got broken by ecafec3b59ad218c11133fec63e73bf83c4fc068.

Fixes #264