Use the last Loop Stop key for calculating animation velocity (Fixes #1776)