Strictly compare values when determining whether to save or not (see #5471)