Only apply named parameter serialization for template transclusions

Parser functions don't necessarily support named parameters, so serializing as
such won't necessarily work.

Change-Id: I9634ad01f7c0b4f8189bf837b65e69196876faa7
Merge "Only apply named parameter serialization for template transclusions"