Simplify code a bit. NFC.

Thanks to Sean Silva for the suggestion.