Fix bug in ContentHandler parsing that breaks resttests