For example:
# OK
iris %>%
group_by(Species) %>%
attr("indices")
# not OK
iris %>%
group_by(Species) %>%
filter(n() > 0) %>%
attr("indices")
devtools::session_info()
# dplyr 0.4.0.9000 2015-01-11 Github (hadley/dplyr@cd91f33)
If this is intended (I imagine its not), then at least the n_groups() method for a grouped_df needs to be fixed.