Revert "Attempt to fix a crash by removing an assertion that fails."

This reverts commit b6337f8c909d6151efa5bad608d911613d520de0.