Now get last insert works. I think it should use results filter, but I haven't
looked into that in enough detail yet.

And some more fixes.