Fixed compile errors for per-fk templates. refs #512