Improve the early data sanity check in SSL_do_handshake()