Fixed type bubbling and lineage

https://github.com/kfgodel/diamond/issues/29