Fix optimizing pointer differences in Duetto