Fixed a bug with cell_tree_get_offset

Also added debug print to type inference results