Modified while loop to avoid possible array 
bounds error


git-svn-id: svn://svn.code.sf.net/p/elmerfem/code/trunk@6793 04224531-1f84-46d8-96ce-875b9e37dce3