Fix several DEX crashes found by Joxean's fuzzer