Fixed infrastructure code to suppor per-custom result templates. refs #485