Fix applied_roles when resourcify and rolify used together

Fixes Issue #244 introduced in fix for Issue #102.