Finally resolved issue where special characters and keywords were not being found in the keyword table. This was caused from an incorrect unconditional return statement.