get_ref_cache(): only create an instance if there is a submodule