Ensure module candidates are ordered consistently

This gets rid of annoying implementation specific ordering, at the
expense of adding our own arbitrary ordering to the mix.