I'm making a mod where inserters can interact with any inventory of an entity, including the module inventory. Using the new proxy-container.
This works well with all inventories I've tested (so far), except the module inventory of mining drills.
They stop working once the module inventory has been emptied.
Unexpected behaviour on the top left mining drill:

The logic in the gif for rotating an inserter is that it destroys the current container and creates a new one, connecting to the entity underneath it if possible.
The inserter taking the modules out of mining drill activates when the proxy-container has just been created or when the proxy-container putting the modules back in was just created, but stops working if the module inventory is emptied/empty and gets some items later. Only works again once a proxy-container interacting with the mining drill has been recreated.
Edit: They also reactive on_load
The inserter on the top right mining drill happily continues working when there are modules available, but stops once the inventory was empty at some point in time.
Expected behaviour is seen on the bottom where it's interacting with the module inventory of an assembling machine. Where the inserters keep working.
Even when the inventory empties in the bottom left assembling machine.