[zdf] Make width extraction more robust