Fix append with empty flags array