backport "allow open pay_batches to be included in search" to 2.3, RT#22708 (fallout from RT#21879)