by Matteo Scaramuccia.
Hi Richard,
that code has been added with the work for MDL-8249, https://github.com/moodle/moodle/commit/e1980f8bb940696518dab1da77b9844026bca4a4#L27R1018 then the version has been updated with MDL-34237, https://github.com/moodle/moodle/commit/00142ce5536d46c5eba0b344f98f8222fd6dde34#L0L1018.
I've added a short mention of your issue there: maybe there some regression around the way DROP has been implemented for MS SQL.
Matteo