Minor code cleanup from comments in #2115.