Part one for: Automatically starting all modules in their correct order
- TRUNK-4438
(cherry picked from commit b5e1ccdda366e6f7cd72c1d33e0c7f0109076ff6)