The same logic as described in acc28e2e applies to any time we are switching root, to just set the flag unconditionally. (cherry picked from commit b3ad0ff4)