Allow both old-style and new-style role dependencies to be valid.

Fixes #9173