Fix for the uses command

As reported in issue #17074.

This fixes the uses command, so that it works with the changes introduced in 1e0c0cfe169179f383da713944b994dc2da930ee.