This assert was added when porting legalization from Python to Rust and doesn't hold when we have derived type variables.