@DavidFoerster What they had actually typed in
that answer does actually work, though the precise reason remains unclear to me. I have tested it, I've fixed the post to what they almost certainly intended (because it is what they originally wrote, and just failed to apply code formatting to), and we should undelete the post. That answer should never have been deleted.