[Olena-patches] r2670: Fix the skeleton algorithm introduced by aroumougame