Fix reference comparison after redundant phi elimination.

Otherwise, the graph could remain mistyped.

bug:21776173

(cherry picked from commit 51d400d4ebd41b9fb4d67ac3179f8fb66a090fdd)

Change-Id: Iff36dfa4e79b14a9dd85c37e0fbb9e1080dd0364
5 files changed