LP#1635386 Clarify and simplify row highlighting code