Auto pickup always seems to happen at the instant you step onto a tile. This means you pick up whatever there is to be picked up before anything else has a chance to happen, like monsters attacking you or a teleport trap / teleportitis triggering (as in the OP). Though it's a bug, I like it as it makes looting certain vaults more comfortable (you can pickup items before they have a chance of being destroyed by dragon breath attacks etc.)
There's a similar-but-backwards bug with trapped doors that I forgot to report: if you have autopickup on, you can be killed by a falling door and *then* pick up the debris from it. Pretty funny.