core: Ensure hasComputedSubKeys iterates over Sets and Lists properly
core: Ensure hasComputedSubKeys iterates over Sets and Lists properly

This fixes some edge-ish cases where a set in a config has a set or list
in it that contains computed values, but non-set or list values in the
parent do not.

This can cause "diffs didn't match during apply" errors in a scenario
such as when a set's hash is calculated off of child items (including
any sub-lists or sets, as it should be), and the hash changes between
the plan and apply diffs due to the computed values present in the
sub-list or set items. These will be marked as computed, but due to the
fact that the function was not iterating over the list or set items
properly (ie: not adding the item number to the address, so
set.0.set.foo was being yielded instead of set.0.set.0.foo), these
computed values were not being properly propagated to the parent set to
be marked as computed.

Fixes hashicorp/terraform#6527.
Fixes hashicorp/terraform#8271.

This possibly fixes other non-CloudFront related issues too.

tombuildsstuff/terraform,bashtoni/terraform,xsellier/terraform,asedge/terraform,evalphobia/saas-ci-performance-compare-terraform,pgray/terraform,Ticketmaster/terraform,kl4w/terraform,dwradcliffe/terraform,kwilczynski/terraform,nathanielks/terraform,Ticketmaster/terraform,lifesum/terraform,glerchundi/terraform,brunomcustodio/terraform,VladRassokhin/terraform,rnaveiras/terraform,mikesplain/terraform,zachgersh/terraform,tamsky/terraform,mwarkentin/terraform,julia-stripe/terraform,brianantonelli/terraform,hooklift/terraform,BobVanB/terraform,mathematician/terraform,jammycakes/terraform,hrach/hashicorp-terraform,brandontosch/terraform,JDiPierro/terraform,hpcloud/terraform,hartzell/terraform,wowgroup/terraform,Boran/terraform,pradeepbhadani/terraform,BedeGaming/terraform,fatih/terraform,displague/terraform,iljaskevic/terraform,Zordrak/terraform,cakoose/terraform,TheWeatherCompany/terraform,dgolja/terraform,fatih/terraform,cwood/terraform,golvteppe/terraform,lifesum/terraform,rkhozinov/terraform,rkhozinov/terraform,BobVanB/terraform,rnaveiras/terraform,koding/terraform,youhong316/terraform,tpounds/terraform,finanzcheck/terraform,elblivion/terraform,asedge/terraform,tpoindessous/terraform,Wambosa/terraform,hpcloud/terraform,dn1s/terraform,billyschmidt/terraform,niclic/terraform,paultyng/terraform,julia-stripe/terraform,JrCs/terraform,jhedev/terraform,tpoindessous/terraform,svanharmelen/terraform,ericwestfall/terraform,nathanielks/terraform,zachgersh/terraform,glerchundi/terraform,jhedev/terraform,drebes/terraform,rhyas/terraform,mevansam/terraform,ColinHebert/terraform,cloudnautique/terraform,mattray/terraform,paulbouwer/terraform,harijayms/terraform,whiskeyjay/terraform,sl1pm4t/terraform,chrisjharding/terraform,kyhavlov/terraform,markpeek/terraform,svanharmelen/terraform,kjmkznr/terraform,dn1s/terraform,koding/terraform,TStraub-rms/terraform,Ticketmaster/terraform,JrCs/terraform,squarescale/terraform,pradeepbhadani/terraform,svanharmelen/terraform,youhong316/terraform,Pryz/terraform,mevansam/terraform,mathieuherbert/terraform,ericwestfall/terraform,cakoose/terraform,mafrosis/terraform,hooklift/terraform,kl4w/terraform,dwradcliffe/terraform,cmorent/terraform,GannettDigital/terraform,paulbouwer/terraform,huydinhle/terraform,sl1pm4t/terraform,evalphobia/saas-ci-performance-compare-terraform,paybyphone/terraform,KensoDev/terraform,Wambosa/terraform,schans/terraform,ctavan/terraform,HotelsDotCom/terraform,golvteppe/terraform,evandbrown/terraform,iljaskevic/terraform,JDiPierro/terraform,finanzcheck/terraform,mwarkentin/terraform,taliesins/terraform,Wambosa/terraform,foragerr/terraform,mbfrahry/terraform,koding/terraform,brianantonelli/terraform,brianantonelli/terraform,DJRH/terraform,iansheridan/terraform,ctavan/terraform,ross/terraform,julia-stripe/terraform,StephenWeatherford/terraform,foragerr/terraform,TimeIncOSS/terraform,lstolyarov/terraform,jcaugust/terraform,vrenjith/terraform,Boran/terraform,ddegoede/terraform,hpcloud/terraform,jtopper/terraform,mtougeron/terraform,drebes/terraform,ericwestfall/terraform,apparentlymart/terraform,JDiPierro/terraform,evalphobia/saas-ci-performance-compare-terraform,niclic/terraform,yanndegat/terraform,pradeepbhadani/terraform,matt-deboer/terraform,ewbankkit/terraform,clearcare/terraform,jianyuan/terraform,apparentlymart/terraform,PeteGoo/terraform,zachgersh/terraform,yanndegat/terraform,youhong316/terraform,richardc/terraform,kristinn/terraform,fatih/terraform,ashishth09/terraform,drebes/terraform,Pryz/terraform,tmshn/terraform,matt-deboer/terraform,dwradcliffe/terraform,jtopper/terraform,richardc/terraform,vancluever/terraform,evandbrown/terraform,ctavan/terraform,ReleaseQueue/terraform,dn1s/terraform,golvteppe/terraform,cloudnautique/terraform,foragerr/terraform,mattray/terraform,hartzell/terraform,jcaugust/terraform,jammycakes/terraform,Sixgill/terraform,wowgroup/terraform,jrperritt/terraform,dgolja/terraform,samdunne/terraform,gettyimages/terraform,asedge/terraform,jhedev/terraform,jrperritt/terraform,PeteGoo/terraform,mathematician/terraform,vrenjith/terraform,appbricks/ab-terraform-build,squarescale/terraform,heimweh/terraform,ordinaryexperts/terraform,matt-deboer/terraform,bashtoni/terraform,schans/terraform,markpeek/terraform,iljaskevic/terraform,Sixgill/terraform,bradfeehan/terraform,nathanielks/terraform,mtougeron/terraform,foragerr/terraform,randomvariable/terraform,cnicolov/terraform,paultyng/terraform,travertischio/terraform,yanndegat/terraform,tmshn/terraform,brunomcustodio/terraform,vancluever/terraform,dougneal/terraform,ctavan/terraform,BobVanB/terraform,Wambosa/terraform,ewypych/terraform,wowgroup/terraform,billyschmidt/terraform,mikesplain/terraform,maxenglander/terraform,hartzell/terraform,koding/terraform,Sixgill/terraform,antonbabenko/terraform,justnom/terraform,squarescale/terraform,ashishth09/terraform,DevoKun/terraform,gh-mlfowler/terraform,jrperritt/terraform,ryon/terraform,mathieuherbert/terraform,TimeIncOSS/terraform,DevoKun/terraform,ddegoede/terraform,ordinaryexperts/terraform,xsellier/terraform,apparentlymart/terraform,TimeIncOSS/terraform,tombuildsstuff/terraform,mathieuherbert/terraform,brandontosch/terraform,randomvariable/terraform,tombuildsstuff/terraform,harijayms/terraform,jrperritt/terraform,elblivion/terraform,travertischio/terraform,bradfeehan/terraform,maxenglander/terraform,TheWeatherCompany/terraform,donaldguy/terraform,tmshn/terraform,superseb/terraform,Zordrak/terraform,foragerr/terraform,pryorda/terraform,HotelsDotCom/terraform,vancluever/terraform,harijayms/terraform,mikesplain/terraform,jhedev/terraform,BobVanB/terraform,mathieuherbert/terraform,mwarkentin/terraform,crunchywelch/terraform,vancluever/terraform,cnicolov/terraform,squarescale/terraform,bashtoni/terraform,evalphobia/saas-ci-performance-compare-terraform,StephenWeatherford/terraform,wowgroup/terraform,golvteppe/terraform,PaulAtkins/terraform,xsellier/terraform,PeteGoo/terraform,cnicolov/terraform,mathematician/terraform,tpoindessous/terraform,glerchundi/terraform,fatmcgav/terraform,jcaugust/terraform,superseb/terraform,paulbouwer/terraform,appbricks/ab-terraform-build,xsellier/terraform,sl1pm4t/terraform,jcaugust/terraform,VladRassokhin/terraform,ewypych/terraform,rkhozinov/terraform,cakoose/terraform,taliesins/terraform,mikesplain/terraform,hpcloud/terraform,mevansam/terraform,GannettDigital/terraform,clearcare/terraform,gettyimages/terraform,maxenglander/terraform,10thmagnitude/terraform,dougneal/terraform,KensoDev/terraform,donaldguy/terraform,zero-below/terraform,zero-below/terraform,iansheridan/terraform,mathieuherbert/terraform,gazoakley/terraform,gechr/terraform,KensoDev/terraform,dtan4/terraform,kwilczynski/terraform,cakoose/terraform,evalphobia/saas-ci-performance-compare-terraform,cmorent/terraform,PeteGoo/terraform,ewbankkit/terraform,cloudnautique/terraform,tamsky/terraform,kl4w/terraform,mathematician/terraform,JrCs/terraform,kristinn/terraform,cnicolov/terraform,antonbabenko/terraform,finanzcheck/terraform,kyhavlov/terraform,tommynsong/terraform,cakoose/terraform,lusis/terraform,niclic/terraform,schans/terraform,Boran/terraform,grasshoppergroup/terraform,crunchywelch/terraform,kjmkznr/terraform,pgray/terraform,zero-below/terraform,lusis/terraform,huydinhle/terraform,jammycakes/terraform,antonbabenko/terraform,randomvariable/terraform,Ticketmaster/terraform,pgray/terraform,lstolyarov/terraform,paybyphone/terraform,Pryz/terraform,caiofilipini/terraform,hashicorp/terraform,cloudnautique/terraform,whiskeyjay/terraform,elblivion/terraform,antonbabenko/terraform,richardc/terraform,evandbrown/terraform,fatmcgav/terraform,zero-below/terraform,ordinaryexperts/terraform,ColinHebert/terraform,BedeGaming/terraform,julia-stripe/terraform,catsby/terraform,xsellier/terraform,paultyng/terraform,displague/terraform,bashtoni/terraform,samdunne/terraform,TStraub-rms/terraform,randomvariable/terraform,crunchywelch/terraform,TheWeatherCompany/terraform,huydinhle/terraform,whiskeyjay/terraform,Sixgill/terraform,GrayCoder/terraform,vrenjith/terraform,DevoKun/terraform,lifesum/terraform,cwood/terraform,jamtur01/terraform,youhong316/terraform,ReleaseQueue/terraform,mtougeron/terraform,crunchywelch/terraform,GannettDigital/terraform,grasshoppergroup/terraform,ryon/terraform,JDiPierro/terraform,TimeIncOSS/terraform,cloudnautique/terraform,billyschmidt/terraform,TStraub-rms/terraform,whiskeyjay/terraform,bradfeehan/terraform,lifesum/terraform,heimweh/terraform,superseb/terraform,dtan4/terraform,HotelsDotCom/terraform,clearcare/terraform,ryon/terraform,ordinaryexperts/terraform,koding/terraform,nathanielks/terraform,PaulAtkins/terraform,ValFadeev/terraform,caiofilipini/terraform,markpeek/terraform,StephenWeatherford/terraform,kristinn/terraform,gettyimages/terraform,clearcare/terraform,Boran/terraform,grasshoppergroup/terraform,ValFadeev/terraform,JrCs/terraform,grasshoppergroup/terraform,niclic/terraform,ordinaryexperts/terraform,luis-silva/terraform,hashicorp/terraform,gettyimages/terraform,luis-silva/terraform,gazoakley/terraform,taliesins/terraform,schans/terraform,gh-mlfowler/terraform,rhyas/terraform,evandbrown/terraform,squarescale/terraform,brunomcustodio/terraform,mbfrahry/terraform,KensoDev/terraform,ashishth09/terraform,ashishth09/terraform,gettyimages/terraform,kyhavlov/terraform,justnom/terraform,ashishth09/terraform,mtougeron/terraform,Zordrak/terraform,vrenjith/terraform,bashtoni/terraform,PaulAtkins/terraform,antonbabenko/terraform,BedeGaming/terraform,travertischio/terraform,mafrosis/terraform,jammycakes/terraform,matt-deboer/terraform,evandbrown/terraform,PaulAtkins/terraform,caiofilipini/terraform,pryorda/terraform,samdunne/terraform,tpoindessous/terraform,chrisjharding/terraform,richardc/terraform,taliesins/terraform,finanzcheck/terraform,mtougeron/terraform,justnom/terraform,dougneal/terraform,clearcare/terraform,mafrosis/terraform,ryon/terraform,chrisjharding/terraform,travertischio/terraform,VladRassokhin/terraform,zero-below/terraform,hartzell/terraform,ryon/terraform,Wambosa/terraform,jamtur01/terraform,ctavan/terraform,mathematician/terraform,golvteppe/terraform,ericwestfall/terraform,nathanielks/terraform,mbfrahry/terraform,ewbankkit/terraform,yanndegat/terraform,kjmkznr/terraform,BedeGaming/terraform,10thmagnitude/terraform,rrudduck/terraform,mikesplain/terraform,ReleaseQueue/terraform,DJRH/terraform,fatih/terraform,Zordrak/terraform,kwilczynski/terraform,samdunne/terraform,julia-stripe/terraform,chrisjharding/terraform,paulbouwer/terraform,elblivion/terraform,cmorent/terraform,jamtur01/terraform,GrayCoder/terraform,cwood/terraform,heimweh/terraform,hooklift/terraform,BobVanB/terraform,kyhavlov/terraform,displague/terraform,donaldguy/terraform,ewypych/terraform,ross/terraform,gazoakley/terraform,superseb/terraform,vrenjith/terraform,appbricks/ab-terraform-build,cmorent/terraform,donaldguy/terraform,billyschmidt/terraform,iljaskevic/terraform,mbfrahry/terraform,tamsky/terraform,wowgroup/terraform,tpounds/terraform,ewypych/terraform,hashicorp/terraform,dwradcliffe/terraform,fatmcgav/terraform,HotelsDotCom/terraform,lusis/terraform,maxenglander/terraform,hrach/hashicorp-terraform,ewypych/terraform,cmorent/terraform,TStraub-rms/terraform,JrCs/terraform,bradfeehan/terraform,pdecat/terraform,HotelsDotCom/terraform,pgray/terraform,Pryz/terraform,heimweh/terraform,caiofilipini/terraform,ddegoede/terraform,zachgersh/terraform,DJRH/terraform,tpounds/terraform,TheWeatherCompany/terraform,pgray/terraform,DevoKun/terraform,VladRassokhin/terraform,dtan4/terraform,ColinHebert/terraform,jianyuan/terraform,maxenglander/terraform,rhyas/terraform,rkhozinov/terraform,asedge/terraform,GrayCoder/terraform,iansheridan/terraform,apparentlymart/terraform,rhyas/terraform,ross/terraform,ValFadeev/terraform,dtan4/terraform,bradfeehan/terraform,randomvariable/terraform,10thmagnitude/terraform,hooklift/terraform,fatmcgav/terraform,paulbouwer/terraform,ReleaseQueue/terraform,paultyng/terraform,catsby/terraform,dgolja/terraform,DevoKun/terraform,hrach/hashicorp-terraform,jianyuan/terraform,dgolja/terraform,Pryz/terraform,10thmagnitude/terraform,brunomcustodio/terraform,GrayCoder/terraform,mattray/terraform,ewbankkit/terraform,rrudduck/terraform,jhedev/terraform,tombuildsstuff/terraform,ddegoede/terraform,catsby/terraform,richardc/terraform,lifesum/terraform,ReleaseQueue/terraform,catsby/terraform,TheWeatherCompany/terraform,glerchundi/terraform,gh-mlfowler/terraform,GannettDigital/terraform,ValFadeev/terraform,paybyphone/terraform,travertischio/terraform,mattray/terraform,zachgersh/terraform,DJRH/terraform,niclic/terraform,ddegoede/terraform,nlamirault/terraform,gh-mlfowler/terraform,10thmagnitude/terraform,iansheridan/terraform,jammycakes/terraform,appbricks/ab-terraform-build,luis-silva/terraform,cwood/terraform,pdecat/terraform,lstolyarov/terraform,rhyas/terraform,glerchundi/terraform,kyhavlov/terraform,tpoindessous/terraform,dougneal/terraform,GrayCoder/terraform,kristinn/terraform,tpounds/terraform,Zordrak/terraform,tmshn/terraform,markpeek/terraform,jtopper/terraform,mafrosis/terraform,hrach/hashicorp-terraform,huydinhle/terraform,ValFadeev/terraform,hpcloud/terraform,TimeIncOSS/terraform,dn1s/terraform,pdecat/terraform,JDiPierro/terraform,dougneal/terraform,StephenWeatherford/terraform,mevansam/terraform,svanharmelen/terraform,DJRH/terraform,GannettDigital/terraform,nlamirault/terraform,jtopper/terraform,finanzcheck/terraform,gechr/terraform,jtopper/terraform,apparentlymart/terraform,brianantonelli/terraform,paybyphone/terraform,PeteGoo/terraform,sl1pm4t/terraform,kl4w/terraform,Sixgill/terraform,kjmkznr/terraform,caiofilipini/terraform,harijayms/terraform,heimweh/terraform,dwradcliffe/terraform,gh-mlfowler/terraform,nlamirault/terraform,lstolyarov/terraform,samdunne/terraform,ColinHebert/terraform,lusis/terraform,harijayms/terraform,luis-silva/terraform,BedeGaming/terraform,gechr/terraform,ross/terraform,brandontosch/terraform,dtan4/terraform,cnicolov/terraform,cwood/terraform,KensoDev/terraform,jamtur01/terraform,jamtur01/terraform,jrperritt/terraform,brianantonelli/terraform,mwarkentin/terraform,kristinn/terraform,TStraub-rms/terraform,elblivion/terraform,crunchywelch/terraform,superseb/terraform,drebes/terraform,displague/terraform,justnom/terraform,mbfrahry/terraform,tamsky/terraform,billyschmidt/terraform,rnaveiras/terraform,pryorda/terraform,rrudduck/terraform,chrisjharding/terraform,matt-deboer/terraform,gazoakley/terraform,kwilczynski/terraform,gazoakley/terraform,tommynsong/terraform,Boran/terraform,fatih/terraform,tmshn/terraform,ericwestfall/terraform,tommynsong/terraform,mwarkentin/terraform,lstolyarov/terraform,StephenWeatherford/terraform,jcaugust/terraform,tamsky/terraform,brandontosch/terraform,jianyuan/terraform,pdecat/terraform,brandontosch/terraform,appbricks/ab-terraform-build,hrach/hashicorp-terraform,jianyuan/terraform,displague/terraform,rrudduck/terraform