Corrected constraints and indexes on KREW_RULE_TMPL_T