But besides the match on May 23rd, they also play against each other on May 27th in the final of the Ukrainian Cup (who made the game schedule????)
I highly doubt that when the schedule was made, it was known who would be playing in the final. And such a situation is also not uncommon in world football (take, for example, the recent events between Manchester United and Chelsea).