I had the DA's staff all sorts of confused when I filed for my name change. I'm not sure how it works in other states, but in Louisiana, you are basically suing the District Attorney in a civil action.
A background check is required to ensure that you are not "running from a criminal past" etc.
So I had the opportunity to "walk it through", taking the paperwork from one office to the next in person, which sped things up and the whole process took 45 minutes.
While in the DA's office, the clerk called the Sheriff for the background check, while holding my ORIGINAL birth certificate in her hand. The one that shows the wrong name AND gender.

She reads off [old name] and spells it, date of birth, Social Security number, and then....WHITE MALE.
There was a pause, then she turned bright red and looked at me, then back at the document, then to me and (while flustered) said "I...um...yes, that is what the document says. Female." She couldn't hang that phone up and give me back the paperwork to usher me into the Assistant DA's little office fast enough!