Allow using generator with CustomTaget or Index of CustomTarget.

Calling generator.process() with either a CustomTaget or Index of CustomTarget as files is now permitted.