bemhtml: make common matches global and fast

/cc @veged