Return correct containing root for detached node to avoid unnecessary typechecking context reset, MPS-19279