generic/397: remove workarounds for wrong error codes