invalidate_ref_cache(): take the submodule as parameter