It's messed up because of the stripInverse flag.  When it tries to resolve XXXP shortcuts, the X just goes back and forth between X and X-1 (which is also named 'X' at that point), so it gets the wrong transformation.  Need to fix it.  Make a graph from 3 UTTs instead of 2.