Refine class path root computation