Prevent duplicate errors in response (fixes #236)

Only last commit is relevant, others come from #234 

Removing changes of 3c7432b fixes bug #236, and since I could not figure out why this piece of code was introduced : I suggest we leave it out until we can rely on a test case :)