This is a fix for http://issues.civicrm.org/jira/browse/CRM-10466