Resolved issue with wrong comparison

* This path needs to be backported to 0.2.x

Fixes: bug #1213074

Change-Id: I98af56809f0ab84c01aa800d7f834c8131657c5f
(cherry picked from commit ab52bfdf5d93893a32aa936f639fd8056638a40b)
Merge "Resolved issue with wrong comparison" into stable/0.2