Add key_for_scope method for scopes that have dynamic keys