Fix potential compiler error with ternary operator.

Change-Id: Ib09815c7b7b41ecc03e1e82f3a896f26b1e23d09
Merge topic 'FixPlotBagTernaryOperatorIssue' into master

a2d8d416 Fix potential compiler error with ternary operator.