This code sequence appears repeatedly in other parts of dmd. While not incorrect, perhaps a look at a bit of combining?