Fix bug which sometimes throws and error on empty collections when using Backbone and grouping.