Fix some issues in Vim troubleshooting code

Ref #1024: issues did not cause that situation, but greatly reduced information available for debugging that issue.