[IM] Ensure deterministic ordering for same ASNs