Fix regex callback match count

See:
https://sourceforge.net/p/ctags/bugs/271/
https://sourceforge.net/p/ctags/bugs/320/

Note: This fix is from Geany. Copying @b4n.