Re-factored implementation of case-insensitive string compares for table names.