fix dimul flags calculation for corner cases (thanks to bavi)
Authored by: c2woody 2010-10-09
Parent: [r3648]
Child: [r3650]