Fix issue #583 with module autoloader not working (fatal error) when modules loaded out of dependency order.