Replace a bool with an enum for clarity, based on review comment from James Dennett.