Fixes #326

Solution was to modify the patch, attached here http://trac.osgeo.org/geonetwork/ticket/498