Fix memory leak related to mixins.