simplify checking for ccm node mem settings

last commit didn't take into account we have to set the env's vars when
they are present too.