getRangeAllNodes has bug: loop for ever