Merge pull request #3834 from 9rnsr/fix11453

Issue 11453 - Compiling packages has a dependency on order of modules passed to the compiler