Sort dependencies in tests.

The `changes_requiring_change()` method returns dependencies in any order, so
we can't expect an order. The fact that it has just worked for Postgres and
SQLite likely has to do with the fact that they do sequential reads in the
order the records were written. Oracle does something else. So just force a
sort.