[PATCH 21.5] Report lstream errors when encoding/decoding