Moved from https://github.com/hadley/dplyr/issues/659, by @matthieugomez
Moved from tidyverse/dplyr#659, by @matthieugomez