Fix ifEquals to be lock helper in lightncandy

Change-Id: Ifd7296ff6e1072adc9ffda66d1a309d6607ffc12