Check blocks of nodes when checking graph isomorphism