this check also applies in resource_scope_not_nested, it can be moved to #resource_scope