Subflow problem

I have a problem with i2c ADC in the subflow.

If I add a subflow with i2c device in flow, the first time it works fine, but after I remove the subflow and deploy, i2c still works.

Further - worse. If I add and remove subflow second time, I see have 2 subflows works simultaneously without any subflows in flow.

I made a small video with timeline comments to show the problem:

Hardware:
Raspberry Pi zero W.
Software:
Node-RED version: v0.20.6
Node.js version: v10.16.0
Linux 4.19.42+ arm LE
ncd-red-ads1115 v.1.2.6

Does anybody know how to solve this problem?

As it is most likely a problem with the contrib-node you are using ncd-red-ads1115, I would suggest opening an issue on the nodes github page ( you can follow a link from the nodes page on flows.nodered.org). You can then communicate the issue directly with the author.

The problem is - why this node works if I haven't it in any flow?
And why it stop work after restart node-red?

Which sounds like something the author should hear about...

It sounds like the node isn't closing correctly. When you hit deploy the node should stop running... but it doesn't appear to be doing that. So when the deploy starts another one - you then have two... etc. So yes please tell the author.

Ok, I will write author. Thank you

One more strange thing, if I add node ncd ads1115 directly to flow, all work fine and node closing correctly. (I deleted node from flow at 0:18 and after that I2C communication stops)

The problem is arise only when I add node to subflow.

Why does this happen?