Warning about missing pattern match, despite pattern matching

Surely this is a bug? The struct is clearly typed. Maybe someone with more knowledge will reply, but I would say file an issue.

Does this infer properly?

def foo(%{"image" => image}) do
  %Plug.Upload{} = image
  %Plug.Upload{image | filename: "foo"}
end