XSLT renderer generator: optimize simple templates that can be merged together