fix user directory path when switches karma home. No static use
WK-193 @comment detect cycles when computing node levels.