This is a post-mortem of the MSSQL extractor errors incident.
We found a root-cause, PHP sorting function is not guaranteed to be stable. It is fixed in PHP 8.0 (https://wiki.php.net/rfc/stable_sorting), but we used 7.4 in the extractor (which is also still supported).
We have learned that in older versions of PHP, a sort function can randomly swap elements with the same value if there are more than 16 values. As the error did not take effect with the lower number of items, our tests did not find it.
We've fixed the bug and added a tests for sorting more than 16 items.