getNodeByRange returns the correct node when giving the first position