expanded _parts_layout_fill in-place
added assert
fixed bug when cut_size was non-zero, added test case