FunctionAttrs: Merge attributes once instead of doing it for every argument.

It has become an expensive operation. No functionality change.