Sorting domain list

This isn't strictly necessary, but it makes certain operations more deterministic.