Changed tag detection algorithm so that non-tagged words which also happened to be used as tags are not parsed incorrectly