PERF: avoid doing GetPoint and SetPoint for the same point

Store the points container into a temporary object, then get a reference on the
point and do whatever.

Change-Id: I8293f956da97ae7bd015861f512ba3d069e1219a
Merge topic 'ExposeBugWithTest'

5aeb6bd PERF: avoid doing GetPoint and SetPoint for the same point