In SERVER-27505, we added support for topsorting our libraries. As part of that change, we stopped sorting the results reported by the scanner:
That caused the dependency orders to change run-to-run, unless you were building with --implicit-cache. Since most users do build that way, we didn't notice.
The solution is to simply append the results in the stable order returned by __get_libdeps.