(ITS#6371) problem with ber_flatten2