[Olena-patches] 4588: Fix behaviour when empty class appears. Fix methods order of the kmean1d loop.