Fix slow match with many selections