I can't think of a name for this macro that's properly descriptive.
It's only used in 2 places so I'll inline it.