Add check for roles table before initializing use_dynamic_shortcuts

This check is necessary to avoid "roles" does not exist errors during a new deploy.