ref #6694 Handle dirty state when adding/removing features