Merge "Fix error checking in append_string" am: e2e2b2d3d3 am: 33e2002540 am: b2140e1246

Change-Id: I07dabf70064881875b5c6fd7522e9334dac3d8d9