implement #522 and fix problems in test files


git-svn-id: svn+ssh://svn.code.sf.net/p/tei/code/trunk@13084 e5332ce4-a50f-0410-b94b-d658400b0204