nested %template fixed in simple case