Seems like $parent.index does not work any more. It is $parent.$parent.index