When %piargs is true, atan2 sometimes does an asksign.
In atan2(x,x), if x is zero (maybe that's far-fetched, I suppose), you're stuck:
Is x positive or negative? pos;
As a general rule, I think simplifying functions shouldn't do asksign. Setting %piargs to false, prevents atan2 from doing an asksign (undocumented). But %piargs : false causes bugs in limit and integrate.