Fix bug in last commit where some incomplete nodes were included on the line