Possible bug in CollectionManager.length

If ng-repeat expression evaluates is a empty list the $watch inside the directives passes undefined to CollecitonManager.setItems which breaks CollectionManager.length