Theory of the reentrant transition in a lamellar antiferromagnet: doped La2CuO4