Refactored module compilation optimization (to build only when changes exist).
Temporarily disabled for more testing as two corner cases are not handled correctly