Sometimes a dynamic_cast was used without testing the returned value. Some are replaced by static_cast, when the dynamic_cast was useless.
Giving them the correct parent changed the spacing. (cherry picked from commit 7f602f3) (cherry picked from commit 718db46)
(cherry picked from commit 8ee3e77)