Re-add a useful assertion in websockets. Fixes #522