Fixed ClassCastException.
Fixed ClassCastException.

svn path=/trunk/eXist/; revision=5599

eXist-db/exist,dizzzz/exist,wshager/exist,jensopetersen/exist,patczar/exist,jessealama/exist,shabanovd/exist,ljo/exist,shabanovd/exist,lcahlander/exist,RemiKoutcherawy/exist,jessealama/exist,ljo/exist,jensopetersen/exist,adamretter/exist,eXist-db/exist,ambs/exist,eXist-db/exist,opax/exist,patczar/exist,patczar/exist,eXist-db/exist,hungerburg/exist,olvidalo/exist,lcahlander/exist,adamretter/exist,lcahlander/exist,kohsah/exist,windauer/exist,joewiz/exist,hungerburg/exist,windauer/exist,windauer/exist,zwobit/exist,wshager/exist,RemiKoutcherawy/exist,RemiKoutcherawy/exist,jensopetersen/exist,hungerburg/exist,jessealama/exist,opax/exist,opax/exist,adamretter/exist,hungerburg/exist,olvidalo/exist,shabanovd/exist,joewiz/exist,shabanovd/exist,MjAbuz/exist,zwobit/exist,ambs/exist,wolfgangmm/exist,kohsah/exist,patczar/exist,jessealama/exist,dizzzz/exist,dizzzz/exist,adamretter/exist,joewiz/exist,eXist-db/exist,shabanovd/exist,ambs/exist,patczar/exist,MjAbuz/exist,windauer/exist,RemiKoutcherawy/exist,kohsah/exist,zwobit/exist,jessealama/exist,joewiz/exist,joewiz/exist,adamretter/exist,ljo/exist,jensopetersen/exist,hungerburg/exist,adamretter/exist,jessealama/exist,dizzzz/exist,MjAbuz/exist,RemiKoutcherawy/exist,ambs/exist,windauer/exist,shabanovd/exist,zwobit/exist,ljo/exist,olvidalo/exist,wshager/exist,ambs/exist,wshager/exist,wolfgangmm/exist,lcahlander/exist,zwobit/exist,wolfgangmm/exist,kohsah/exist,lcahlander/exist,wolfgangmm/exist,ljo/exist,lcahlander/exist,wolfgangmm/exist,MjAbuz/exist,dizzzz/exist,ambs/exist,MjAbuz/exist,olvidalo/exist,windauer/exist,MjAbuz/exist,wshager/exist,RemiKoutcherawy/exist,jensopetersen/exist,wolfgangmm/exist,wshager/exist,kohsah/exist,patczar/exist,olvidalo/exist,joewiz/exist,zwobit/exist,ljo/exist,jensopetersen/exist,kohsah/exist,opax/exist,dizzzz/exist,eXist-db/exist,opax/exist