Various fixes to using the new, flat dependency structure for submodules.