Fix HashMap opApply implementation

The HashMap opApply function now takes hash collisions into account.