Why do some mesh vertices have different height from compact height field?

These are vertices from VoxelMesh.
When I try to test them with data in VoxelArea.compactSpans, some of them have height 0.


As they are generated from CompactHeightField and they are positioned correctly in final scene, this could be strange.

As far as I see it, the vertices are from contours, which are from compact height field. They are supposed to be identical.

So I use same method as that in VoxelContour to find span of x and z with same region id.
Here is the difference I replaced y coordinate of mesh vertices with that of compact height field compactSpans.
Is the height info changed or something?
Is it because the vertices are on the border so there needs to be special handling?