Revert "Simplifying positioning code for root nodes"
Revert "Simplifying positioning code for root nodes"

This reverts commit 46ab0662f5ef8903ac15a44f71c56efbd9055796.

ThibWeb/regexper-static,andrewhead/regexper-static,stof/regexper-static,ThibWeb/regexper-static,stof/regexper-static,angrilove/regexper-static,javallone/regexper-static,freddiecoleman/regexper-static,freddiecoleman/regexper-static,sunao0626/regexper-static,javallone/regexper-static,angrilove/regexper-static,stof/regexper-static,angrilove/regexper-static,sax1johno/regexper-static,sunao0626/regexper-static,sunao0626/regexper-static,sax1johno/regexper-static,andrewhead/regexper-static,sax1johno/regexper-static,andrewhead/regexper-static,freddiecoleman/regexper-static