Fixed a nasty bug with non-projective trees