Remove unnecessary valid() override which would cause infinite loops at end of file.