SceneTree: Fix reparent crash with animation tracks renaming disabled
This check was there since the first commit in 2014, but a later feature added in 2018
with #17717 did not properly update the code while adding non animation-related code
in `perform_node_renames`.
Fixes #40532.
(cherry picked from commit d107fd4c9e198e6100eb683ee4fb13d5c6b3ba31)