Fixing tag collision check for released versions

Change-Id: Ied066ceb8f9a117516c83b6ea13835efe1166c38
diff --git a/jjb/shell/tagcollisionreject.sh b/jjb/shell/tagcollisionreject.sh
index 82b4c63..eee4446 100755
--- a/jjb/shell/tagcollisionreject.sh
+++ b/jjb/shell/tagcollisionreject.sh
@@ -83,14 +83,14 @@
 
 # check if the version is already a tag in git
 function is_git_tag_duplicated {
-  while IFS= read -r existing_tag
+  for existing_tag in $existing_tags
   do
     if [ "$TAG_VERSION" = "$existing_tag" ]
     then
       echo "ERROR: Duplicate tag: $existing_tag"
       fail_validation=2
     fi
-  done <<< $existing_tags
+  done
 }
 
 # from https://github.com/cloudflare/semver_bash/blob/master/semver.sh