Improve reference editing validation/dirty checks