[Olena-patches] milena r3558: Fix subsample() routine