The `min_comp` and `max_comp` is common with L2158:2159, so pull it outside the `if` statement.