Diagnose and reject custom targets given to the export() command immediately. Previously we would generate an internal error later.