[1.7.x] Fixed #22979 -- Moved bug* tests

Backport of 11181a64f from master.