Hey I ran into this same issue:
The mod Logistic Machines (1.0.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Logistic-Machines::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Logistic-Machines/control.lua:558: in function <Logistic-Machines/control.lua:534>
stack traceback:
[C]: in function 'index'
__Logistic-Machines/control.lua:558: in function <Logistic-Machines/control.lua:534>
When I either click on the inserter in the gui or I click on the assembler after setting an item.