Just a note in case anyone else stumbles upon this and gets as confused as I did: there is a discrepancy between how the UpIntfName DB variable handles sub-interfaces and how routers/switches handle them. UpIntfName selects interfaces that don't have 'shutdown' in their config. For example:
interface gi0/0
description physical interface
shutdown
interface gi0/0.10
description sub-interface
no shut
With the above configuration a 'sh int desc' on the router will show the sub-interface as being 'admin down' because it's parent physical interface is shutdown. However, UpIntfName will include the sub-interface in any templates you deploy. To correctly exclude the sub-interfaces from UpIntfName you have to enter the shutdown command on each of them (and probably re-sync the device in Prime). Was getting confused as the show commands on the router said the subs were shut and it was only when I looked at 'show run int' that I noticed they're actually not.
Anyway, its not a bug or problem, just thought I'd mention it, hope that helps anyone who comes across it.
Dave