Fix #13939: Same-unit relative animations
(cherry picked from commit 00231d5d94d3374d53bfe79e04ba253250c73087)