Fix expected length check for AppendEntries packets.