Added a class to wrap callable in settings:
* Not to call in the debug page (#21345).
* Not to break the debug page if the callable forbidding to set attributes (#23070).
Thanks @bmispelon for giving me some advice.
Backport of d0889863de50d65659f56f0b9ea0672a8b6482a1 from master.