fix handling of more than 2 repetitions of same mail header