I have a tree growing out from the edge of a cliff wall. It looks like the game thinks that the tree is “on the ground” even though only the very edge of the tree trunk touches the very edge of the cliff diagonally! The first block of ground under the trunk is about 16 blocks down.
Some failure in the sanity check for tree placement I guess.