Fix utGallery::writeTemplate missing metadata key error when input is also utGallery

@jklontz Without this fix, the following failed:

    br -algorithm FileExclusion -enroll in.ut out.ut

With a missing metadata key error (on FrontalFace, because the AlgorithmID was -1).