Unexpected DataFrame.groupby.apply miscalculation
Using `DataFrame.groupby.apply()` and make a copy of one of the columns may have unexpected result.
#### Code Sample
```python
import pandas as pd
data_list = [
    ['Class A', '1'],
    ['Class A', '5'],
    ['Class B', '7'],
    ['Class B', '2'],
    ['Class C', '3'],
    ['Class C', '9']
]
df = pd.DataFrame(data=data_list, columns=['Class', 'Number'])
def func_(x):
    x['Temp'] = x['Number']
    x['Comment'] = x['Temp'].apply(lambda y: y + ' is a number')
    x = x.drop(columns=['Temp'])
    return x
result = df.groupby(['Class']).apply(func_)
```
#### Problem description

If I try to make a copy of one of the columns and drop it after using it in `DataFrame.groupby.apply()`, the result is unexpected. The result is filled with first group's duplications.

I have done some tests and found that it is a very special case:
  - If I make a copy of table in the apply function (x = x.copy()), the result will be expected.
  - If I drop the 'Temp' column by using `inplace=True`, the result will be expected.
  - If the length of each group is not equal, the result will be expected.

I knew it may not be a good way to add or drop columns in apply function, but I think it is still a bug.

#### Expected Output

Class | Number | Comment
-- | -- | --
Class A | 1 | 1 is a number
Class A | 5 | 5 is a number
Class B | 7 | 7 is a number
Class B | 2 | 2 is a number
Class C | 3 | 3 is a number
Class C | 9 | 9 is a number

#### Unexpected Output

Class | Number | Comment
-- | -- | --
Class A | 1 | 1 is a number
Class A | 5 | 5 is a number
Class A | 1 | 1 is a number
Class A | 5 | 5 is a number
Class A | 1 | 1 is a number
Class A | 5 | 5 is a number



#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.5.final.0
python-bits: 64
OS: Darwin
OS-release: 17.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: zh_CN.UTF-8
LOCALE: zh_CN.UTF-8

pandas: 0.23.0
pytest: 3.5.1
pip: 18.1
setuptools: 39.1.0
Cython: 0.28.2
numpy: 1.14.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.4.0
sphinx: 1.7.4
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.2.1
tables: 3.4.3
numexpr: 2.6.5
feather: None
matplotlib: 2.2.2
openpyxl: 2.5.3
xlrd: 1.1.0
xlwt: 1.2.0
xlsxwriter: 1.0.4
lxml: 4.2.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.7
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>
