How does gerrit:73137 look as a fix?
Unfortunately it was merged before I could review. I have left a comment.