Sorry about the double post, but I had a brainwave about why it isn't working.
CM9 has a stack of built in settings that stock doesn't, the built in settings could be stopping tasker from turning the screen on and off. Go into settings, and look for display options, or power options. See if there is anything there that turns the power off the tablet when the cable is taken out. If you disable that, it should work.