fixed a bug in andOrTagCase1Helper()
added a test case of andOrTagCase1Helper()