Please see RT #5442. A patch for this issue and a memory leak within the same function has already been committed to the trunk and is awaiting review and pullup to the release branch.