Follow-up refactor. I need this commit to be back-portable.