If a technology has no prerequisites and the remove_prerequisite function is called, the function errors out due to the empty table.
Changing line 786 to
if technology and technology.prerequisites then
fixes the issue. I'm not very good with lua, so there's probably a more elegant way to do this, but it works.