Push item to the beginning if it is depending on a parent