The tests added in PR16850 assumed that the field localservices returned by getnetworkinfo was a string representation of an integer, when it is really a string representation of a hex. This fixes the test to decode the field properly and do the correct bitwise comparisons.
This is a backport of Core PR16991