Rolling on groupby result gives different result than rolling on each group
#### Tell me if the last 2 out of 3 games played by player were category 3:
```python
import pandas as pd
match = ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'e', 'e', 'e', 'e']
category = [3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2]
player = ['bar', 'baz', 'chaz', 'baz', 'choo', 'chaz', 'chaz', 'foo', 'baz', 'choo', 'foo', 'char', 'baz', 'choo', 'foo', 'chaz', 'baz']
hc = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1]
games = pd.DataFrame({'match': match, 'category': category, 'player': player, 'hc': hc})
games['hicat'] = games.category.gt(2)

for k,g in games.groupby('player'):
    print(k)
    print(g.shift().rolling(3, min_periods=2).hicat.sum().fillna(0, downcast='infer').astype(int).gt(1))
# ...
# Relevant bit, and correct:
# choo
# 4     False
# 9     False
# 13    False
#       ^^^^^
# Name: hicat, dtype: bool
# ...

games["hicat_calc"] = games.groupby('player').shift().rolling(3, min_periods=2).hicat.sum().fillna(0, downcast='infer').astype(int).gt(1)
games
# Relevant bit, incorrect, and different than before. (Row 13. hicat_calc should be false, as above):
#    match  category player  hc  hicat  hicat_calc
# ...
# 4      b         2   choo   0  False    False
# ...
# 9      c         3   choo   0   True    False
# ...
# 13     e         2   choo   0  False     True
# ...                                      ^^^^ !!!

```
#### Problem description
Pandas produces different results for rolling() with min_periods when iterating over groups vs. applying operations directly to the rolling() output.

#### Actual Output
`rolling()` must be doing bizarre stuff in the background, because the straightforward calculation above yields different answers for the iterating case vs the straight application. We get `False` in row 13 of the iterating case, and `True` in the latter. ("`False`" is the correct output.)

#### Expected Output
A lot of things, really. `rolling()` is a mess. However, the expected output is either that the incorrect result should be encountered both when iterating over the groups, or that the correct one should be encountered both times. Preferably the latter.
#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-43-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: None
pip: 18.1
setuptools: 40.6.3
Cython: None
numpy: 1.15.4
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>
