Optimizing Block-Stacking Operations With Relocation