Retain part of the steps dropped in c839e333667f5a2234f9ec1e5540a60199937997 to avoid regression on #364