mIRC is designed to connect to IRC servers. ZNC is designed to act as a middleman between IRC clients and servers. If this behaviour is only occurring when mIRC is connected via ZNC then this is a bug in ZNC since it isn't passing some necessary information to mIRC.