autoload.lua: fix autoloading of files to prepend

This used the wrong index variable, and thus didn't work.