Add support for "cascade" pattern inheriting.
Consider the parent node children when inheriting
Fix some tests and put an id to anonymous elements