[#78369232] Fix cycle in tasks ordering