Random SAN ordering?

I am seeing occasional certificates where the issued certificate lists its SANs in an apparently random order; it’s not alphabetical, nor does it follow the order specified in the CSR. Does anyone know why this would occur?

The answer is probably somewhere in this code:


A few lines below the above it says something about reordering:


And the function in question most likely the culprit for the reordering:

Don’t have enough Go knowledge myself to begin to fix that, so I opened a ticket; #1469 on Github, since I can’t create additional links at this time?