Fix collecting userdata again. This one was tricky.

Userdata may disappear from Lua and come back later. In that case, we
need to keep their table alive.