More robust KeywordsToIgnore logic