stockpiles: more backporting fixes