Clean while compiling to resolve weird type erasure corner-cases