I've lost my IMEI (*#06# blank, no signal thingie) few times after flashing a ROM some time back, but not recently though.. Probably an issue with recovery used for flashing. (I didn't see that problem in newer versions of recoveries.)
When that happened, got things back to normal by flashing a ROM ftf with flashtool. Some have reported that restoring a cwm backup would get back the imei. Anyway, it's "difficult" to erase imei in our Sony than Samsung it seems..