sort after importsMap is complete for the best results

fix test that already had a note about breaking on different JVMs,
converted it to a general check on the indexes of two ontologies that
have a dependency while leaving it open for the third, other than
checking for existence