I believe md_decode_utf16le_before__() returns the wrong value. The function is supposed to return the character before the offset. We can compare with the utf8 version md_decode_utf8_before__() which returns CH(off-1).
I have created a PR here. #265