Partial revert of "Fix inefficient shell minimization"