Make restore_attributes public

Also make it accept a list of attributes to be changed. This will make
possible to restore only a subset of the changed attributes.

Closes #16203