The foundation axiom and elementary self-embeddings of the universe