Check animation duration type based on number of animated items instead of last animated item. Fixes #129.