the reported problem has been worked around in current git tree.
unfortunately, the problem might resurface if e.g. a slot option enables a sub-slot option where one of the devices has a rom that is not used anywhere else... which is not happening at the moment and I hope it will never happen :-)
however, the issue is complex: current MAME core is heavily hierarchical, with the "central" machine requiring a driver to be attached as root_device, and then as many slot devices as you like that can be connected creating a (virtually) infinite tree of possible configuration. since a listing command as -lx cannot walk through the whole tree, it currently tries to be "creative" and simulate attaching each device to a driver and giving the corresponding output for both the attached device and its subdevices. It does not walk further down, though. I think no clean solution is really possible, until we impose a "machine neutrality" system that allows devices to be attached to the main machine without intermediate steps.
such advancement would also allow to clean up a few small inconsistencies of the -lx output for some devices across different releases: devices like disk controller can be configured differently in different systems, and thus their available slots or the format they support for loading depend on the system you are parsing. This is absolutely fine when you invoke "mame system -lx", but it's less pleasant in "mame -lx" because each device is output only at its first occurrence and thus you only detect the configuration of its first appearance (and this might change across releases when new drivers are added).