Bugfix: sort readers by idmap as secondary criterion

Otherwise, the file name IDs are not strictly monotonically increasing,
which is expected by the index format for decoding.