[#1879] Correctly validate close frame