This is a simplified version of the code in question, one generic class uses another class with generic type parameters and needs to pass one of the generic types to a metho
You can have overload the methods. This does not solve your problem but it minimizes the number of warnings (and yes, it's a hack!)
class Assembler {
void assemble(X container, Y a1) { ... }
void assemble(X container, Y a1, Y a2) { ... }
void assemble(X container, Y a1, Y a2, Y a3) { ... }
void assemble(X container, Y a1, Y a2, Y a3, Y a4) { ... }
void assemble(X container, Y... args) { ... }
}