ksgen/tree: fix error when construction using dict

Change-Id: I4a9ea866edf2919f84685ad458b6cd91b34db986