[WIP] fix #858

make resolving can work with a type chain three packages.