The SORT and SORT_RO commands support an option to sort by an external keys using a pattern. This functionality is disabled in cluster mode because there is no way to know the keys ahead of time, and such the corresponding function to getKeys from a command does not include them.
We should add an explicit check when accessing the keys in SORT and SORT_RO to make sure we have access to read from them before returning the request.