Fix off by one that causes adjacent nodes to show as overlapping

Added tests, but didn't run them as part of the suite, as I don't have qunit.