decodeMessage will now scan the input for a header if the first read failed