            end
          end)
       |> Enum.filter(fn {_, v} -> v !== nil end)
-      |> Enum.into(%{})
+      |> Map.new()
 
     if map_size(diff) != 0 do
       diff

             _ -> {k, v}
           end
         end)
      |> Enum.into(%{})

    map1
    |> Map.merge(diff2, &do_patch_merge/3)
    |> Enum.filter(fn {_k, v} -> v !== @sentinel end)
    |> Enum.into(%{})
  end

  defp do_patch_merge(_k, v_map, v_diff) do

               {_, nil} -> false
               _ -> true
             end)
          |> Map.new()
      end

    if diff != %{} do
      diff
      |> Enum.concat([{"_t", "a"}])
      |> Map.new()
    else
      nil
    end
