fixed the order in the hashes (cpt-lhs) of build-cpt-for-nodes and wrote a test for it