Simplify visual diff flag calculation

... by using ES5 sweetness.