Bug 18579: Fix call to append_fields, fix tests