Change errant if to when (Bug#31840)