[aot autograd] fix de-dupping metadata computation bug (#100431)
Fixes https://github.com/pytorch/pytorch/issues/100224
There was a bug in the way that metadata was computed when going from "metadata before-removing-dupes" to "metadata after-removing-dupes". In fact, when I ran the repro with `functorch.config.debug_assert = True`, that immediately signaled to me that the metadata was incorrect.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100431
Approved by: https://github.com/ngimel, https://github.com/albanD