Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Your command works fine for me on the logo image on IM 6.9.0.7 Q16 Mac OSX. If it is on other images, then post the input and your output.
Note that 5x5 is just 5 graylevels out of 65535 on Q16. It should be miniscule on Q32. I always use percents rather than raw values so that it does not matter what Q level I am using. I don't really use Q32. If I want high quality, I use Q16 HDRI. I do not see much point in Q32. But perhaps you have a requirement that I have not given consideration.
I haven't checked this by applying a patch, but I think the problem is in enhance.c. Function LevelImageChannel() has parameters black_point and white_point, which that function thinks are in the range 0 to QuantumRange. However, it is frequently called with those parameters in the range 0 to MaxMap.
For Q8 and Q16, MaxMap == QuantumRange. For Q32 and Q64, MaxMap != QuantumRange.