Fix d2 rewrite bug

RB=249757
R=osumampo,jbetz,dhoa,si-dev,axu
A=dhoa,axu
Bump pegasus version