fix detection of strange (xxxNpM) structures when finding the device for a partition