Don't re-enable apply changes in reference dialog if the changes have been undone

Per Roan on Ib5229bdc

Bug: T57976
Change-Id: I0450ab59ea8aa2e3130eb9124de74e67ffc0497f