perhaps it has to do with a missing ampersand?
I notice in documentation examples, the usage of factory looks like this:
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory('sendmail', $params);
Note the assigment using =&