-Fix (#235): Object_GetDistanceToEncoded calculation used the wrong object's type (thanks SergeYunev)