avoid repeated NodeList.length calculation [refs #694]
0.8.8