This is also reproducible with 1.6.35.
Gamma correction corner case
Nevermind, I forgot to add png_set_swap().
endianness issue when decoding to RGBA 16-bit