Backout 3f4d5bcba1fb (bug 883973).
Bug 890495. Fix comparison of legend position. r=roc