Fix #571: Huge performance hit when enabling animation