I found there's a serious problem that it doesn't work under the new version of wordpress.
The hook should better to attached on 'wp_enqueue_scripts' than just 'wp', which will set the plugin to process before everything, and the queueing of scripts and stylesheets by theme is not done yet at the time.
Didn't test on older versions of wordpress, but those shall work as will.
Fix load problem under Wordpress 3.4.2
I think it was an inevitable move.
Some themes (like reported here http://wordpress.org/support/topic/plugin-wp-less-wp-34) enqueue their stuff at the latest moment.
I usually register stylesheets etc. on init event, which leads me to no problem, even with the latest WP version.
Anyway, I feel it's safer to postpone to the latest moment possible the compilation process, agreed.