Fix reference leaks introduced by the patch for issue #5308.
Fix reference leaks introduced by the patch for issue #5308.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator