Don't shadow built-in type 'list'

Fixes #10245.