Only peek at the node type for logging.

This prevents "Trying to reassign node type" exceptions. Logging should
never affect the data being logged.
Merge pull request #532 from slick/tmp/peek-type-in-logging

Only peek at the node type for logging.