Fix node as tree flag logic.

Signed-off-by: Toha <tohenk@yahoo.com>