Fixed list() not making a copy (#22093)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/22087
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22093
Differential Revision: D16036814
Pulled By: Chillee
fbshipit-source-id: 3c7106f907415ed0f600acaf45d2c61e1c60867a