Prevent getting stuck in a state when there is a missing animation

Fixes #769