Use memory object streams in test_receive_invalid_max_bytes()