remove unnecessary always-nil var from #compact
Merge pull request #8675 from goshakkk/cleanup

Remove unnecessary always-nil var from #compact