Fix crash when refreshing an unexpanded node.  Improve error logging.