Fix determining if a rule applies to a certain model