better logging for 'eof && !HAS_MSG'

I'm trying to debug some situations that fall back to local compilation for no obvious reason, where my logs show lots of "eof && !HAS_MSG" messages.  This patch logs the value of instate as in a similar log a few lines below, and uses the at_eof() function instead of duplicating the check condition.