Fixed rare bug where lastPaint was the same for different tags