Use mattr_accessor to save state of scope key

Instance variables in modules get messy with inheritance. This ensures
that @_scope_keys is the same at the parent module and child module
level.