[mock][PATCH] fix handling of submodules