Correct check for role library/ existence

Fixes #8633