Fixing a bug with accidental comparison a variable with itself.

Signed-off-by: Simon Stewart <simon.m.stewart@gmail.com>