Again, not all (MS-DOS) device names are invalid (Windows) file names. You can't blame Windows for providing information that is used improperly by mIRC. Remember that mIRC is not an MS-DOS application, and never was.
What mIRC should do instead is test for a small subset of hardcoded device names - see the "reserved device names" list at
Microsoft's own advice on naming files.