Add test for duplicate export attributes; fix uncovered bug.