[#1831] Fix loading modules for avoiding circular loading