Fix --list all option

Fixes #10982