The track by
should come after the filter
as in this example from the angular docs:
item in items | filter:searchText track by item.id
is a pattern that might be used to apply a filter to items in conjunction with a tracking expression.
So switch
<li ng-repeat="item in group.numbers track by $index | filter:query">
to
<li ng-repeat="item in group.numbers | filter:query track by $index ">{{item}}</li>
And you're set.