Functionality fixes for Generex.getFirstMatch and relevant tests