Fix lifecycle issue with card layout mixin.