Add "id_or_name" option to NamedSelector

Closes #588