Ported Jens' code for default sorting of VRA records.