I was getting something similar where the error was saying that 'inserter' was nil
I fixed this by modifying the mods control.lua.
I added a check to see if the player.opened or the player.selected exists and that it is an inserter, anywhere set_arm_position was getting called.
Code:
If it's setting inserter by player.selected, no modification needed to the line below. If setting by player.opened just switch 'selected' for 'opened'.
if it's not being called from an event function (on_..._) no need to check the event stuff, unless event is being passed, in which case this is fine.
"if event.element and event.element.valid and player.selected and event.button == defines.mouse_button_type.left and not event.control and not event.shift and inserter_utils.is_inserter(player.selected) then"