Improve script being sourced, checking if it's a submodule or not.