fix template index problem.  swap over to maintaining a list of rules
per plugin when scanning -- each plugin now only has to iterate its own
rules to find if it needs to add/create a new one.