Makes CSS animation restarts not prone to calamitous race conditions.