BZ-1006079: sorting OTCs prior to serialization
(cherry picked from commit 34031e1a75d0391b30e6bd5462dd85dd4928dbdd)