Fix bug that masked exceptions that occurred in a generator being compared.