Slice key matches array

To prevent keys registered or unregistered during dispatch from breaking the dispatching.