Added acceptance tests and a slightly modified fix for #1020 that checks
the message type to make sure to not wrongly classify messages as timeout
messages