The situation can be a little more complex. o2 do lock the majority of handsets to their network if on a contract. (They need to recover the subsidised cost of the handset via their tarrif). There is also a SIM incompatibility between early handsets and later ones I believe, but I don't know...