lnodes_is_valid: does not use pow for integers anymore.