dependency: don't try and expand yourself.

This can happen on e.g. fossil where the dependency HEAD requires having
an install of fossil in order to check it out. Bit of a silly edge case
but this handles it.

Fixes #25605