Tweak the logic node parsing.

I think this is correct. It may have been OK before, but I made this change on
another branch. One change or the other is needed to make it cope with node names
containing "OR".