INIT_BNVAR wronly generated when branch was not root branch, fixes #589