Merge pull request #2976 from wvanlint/simplify_trait_object_impl