mz-endian: device lookup fixes