I had the same issue. If I didn't include quotes, i.e. settings_file not like %licenses%, it failed. When I added single quotes, i.e. settings_file not like '%licenses%', the error when away and the report worked.