The problem is that GH_SUBDIR are handled in a somewhat random manner. (The
truth is that in the end of things, they end up being sorted by the group name
being used in the GH_TUPLE.)
So if you have a submodule in bar/foo, and a sub-submodule in bar/foo/baz, it
may happen that foo/bar/baz is handled before foo/bar and then things are
messed up.
This makes it so the GH_SUBDIR target handling is sorted first by the
number of / in the path. (So, bar/foo is always handled before
bar/foo/baz.)