[MAT-468] Quickfix for signed/unsigned comparison.

Moving to gcc-4.9+ highlighted signed/unsigned comparisons in
these locations. Fixes attempted.