Comment 96 for bug 1068404

@xnox
You can take a look on comment #44 for the proposed patch