Merge "Fix for redundant comparisons bug"