Fixing a bug in variable precedence for roles and dependencies