Add test for exported traits.

    Currently segfaults compiler.