Bug #757247 should be merged with this, as it appears that the problem described has the same origin. Also, the patch to python-PIL suggested in that bug report fixes this issue.