bemhtml: introduce tree structure checks

n/t