fix setModified() so that OpenGL updates properly (#1786)