map: fix psidlen becoming negative (FS#1430)