Editing this because the first draft was a touch too smug. Lesson: ship it, then sleep on it.