Fix warnings for unused expressions introduced by contravariance changes.