Support generic types when outer type doesn't need to be replaced but one of inner types needs replacement