Fix for  #1367: allowSameAnimation is not used in setAnimation