I haven't yet tried the SQL script above, I've been off down many other rabbit holes. But I am quite frustrated by the inability of RM to use the woman's married name when she is married. I am finding my users get really confused (and sometimes I do also). It is not only with death and burial events, but also directory listings, and census events that say "in the household of " and give her maiden name, even though she is a 65 year old widow with 10 children, even though her obituary is in her married name. It causes viewers on the website to scroll up and down, trying to figure out if they got on the wrong page by mistake or what. To make it more confusing, manually typed text, such as newspaper articles, obituaries, etc, of course use the married name. So from event to event, the woman's last name keeps flipping back and forth.
If I had a wishlist for RM, my very first item on the list would be the ability to put a flag on each event, "use married name" if desired. Then I could check that flag for every event that happened after she was married.