Fix StringCollection.Contains

Return true only if last state in path is a final state.