dynamic-time-warping: Fix incorrect graph transform.

Take into account CSS vertical-flip transform.