Fixed logic of element attributes updating.
Merge branch 't/11780' into major