     clauses = [struct_clause_for(line) | clauses] ++
               [fallback_clause_for(fallback, protocol, line)]
 
-    change_impl_for(t, protocol, types, structs, is_protocol,
+    change_impl_for(tail, protocol, types, structs, protocol?,
                     [{:function, line, :impl_for, 1, clauses} | acc])
   end
 
-  defp change_impl_for([{:function, line, :struct_impl_for, 1, _} | t], protocol, types, structs, is_protocol, acc) do
+  defp change_impl_for([{:function, line, :struct_impl_for, 1, _} | tail], protocol, types, structs, protocol?, acc) do
     fallback = if Any in types, do: load_impl(protocol, Any)
     clauses = for struct <- structs, do: each_struct_clause_for(struct, protocol, line)
     clauses = clauses ++ [fallback_clause_for(fallback, protocol, line)]
 
-    change_impl_for(t, protocol, types, structs, is_protocol,
+    change_impl_for(tail, protocol, types, structs, protocol?,
                     [{:function, line, :struct_impl_for, 1, clauses} | acc])
   end
 
-  defp change_impl_for([{:attribute, line, :spec, {{:__protocol__, 1}, funspecs}} | t], protocol, types, structs, is_protocol, acc) do
-    newspecs = for spec <- funspecs do
+  defp change_impl_for([{:attribute, line, :spec, {{:__protocol__, 1}, funspecs}} | tail], protocol, types, structs, protocol?, acc) do
+    new_specs = for spec <- funspecs do
       case spec do
         {:type, line, :fun, [{:type, _, :product, [{:atom, _, :consolidated?}]}, _]} ->
           {:type, line, :fun,


    call_args = :lists.map(fn i -> {String.to_atom(<<?x, i + 64>>), [], __MODULE__} end,
                           :lists.seq(2, arity))
    call_args = [quote(do: t) | call_args]

    quote do
      name  = unquote(name)

        c
    end, clauses)

    change_impl_for(tail, protocol, types, structs, true,
                    [{:function, line, :__protocol__, 1, clauses} | acc])
  end

  defp change_impl_for([{:function, line, :impl_for, 1, _} | tail], protocol, types, structs, protocol?, acc) do
    fallback = if Any in types, do: load_impl(protocol, Any)

    clauses = for {guard, mod} <- __builtin__(),
