Dear Nicholas,
Yes I definitely see the bug. However, Kodi extensively uses pcrecpp and the only replacement I see for pcre2 is jpcre2 [1]
There is an ITP bug about it since 2017 but no package.
Matthew, from your experience, is jpcre2 the only C++ wrapper for pcre2 or there is something more recommended / maintainable?
I did the search but found only jpcre2.
[1]
https://github.com/jpcre2/jpcre2