Shift issue numbering for pattern "bug #?[0-9]+"

(see #7235)
Shift issue numbering in function names like test_bug123

(see #7235)

fixes #8286
More fixes for "def test_.*bug123"
Merge pull request #8287 from skirpichev/8286-fix

Shift issue numbers for patterns in #8286