Fix bug in schedule validation.
Fix bug in schedule validation.

Lots of invalid schedules were slipping through when a function was used in multiple places.

kgnk/Halide,tdenniston/Halide,myrtleTree33/Halide,jiawen/Halide,kenkuang1213/Halide,dan-tull/Halide,jiawen/Halide,dougkwan/Halide,smxlong/Halide,ronen/Halide,myrtleTree33/Halide,psuriana/Halide,delcypher/Halide,delcypher/Halide,dougkwan/Halide,psuriana/Halide,psuriana/Halide,smxlong/Halide,kenkuang1213/Halide,dan-tull/Halide,dan-tull/Halide,myrtleTree33/Halide,jiawen/Halide,smxlong/Halide,dougkwan/Halide,fengzhyuan/Halide,myrtleTree33/Halide,tdenniston/Halide,adasworks/Halide,dougkwan/Halide,fengzhyuan/Halide,ronen/Halide,kenkuang1213/Halide,smxlong/Halide,adasworks/Halide,kenkuang1213/Halide,tdenniston/Halide,fengzhyuan/Halide,delcypher/Halide,dougkwan/Halide,tdenniston/Halide,smxlong/Halide,ronen/Halide,mcanthony/Halide,mcanthony/Halide,delcypher/Halide,ronen/Halide,kgnk/Halide,delcypher/Halide,myrtleTree33/Halide,dan-tull/Halide,mcanthony/Halide,fengzhyuan/Halide,myrtleTree33/Halide,jiawen/Halide,delcypher/Halide,kgnk/Halide,kenkuang1213/Halide,kenkuang1213/Halide,smxlong/Halide,fengzhyuan/Halide,dougkwan/Halide,dan-tull/Halide,fengzhyuan/Halide,kgnk/Halide,ronen/Halide,ronen/Halide,ronen/Halide,jiawen/Halide,dougkwan/Halide,dougkwan/Halide,adasworks/Halide,tdenniston/Halide,mcanthony/Halide,dan-tull/Halide,tdenniston/Halide,jiawen/Halide,fengzhyuan/Halide,myrtleTree33/Halide,dan-tull/Halide,ronen/Halide,mcanthony/Halide,delcypher/Halide,kgnk/Halide,mcanthony/Halide,adasworks/Halide,tdenniston/Halide,delcypher/Halide,tdenniston/Halide,adasworks/Halide,psuriana/Halide,psuriana/Halide,jiawen/Halide,fengzhyuan/Halide,dan-tull/Halide,mcanthony/Halide,mcanthony/Halide,adasworks/Halide,myrtleTree33/Halide,kenkuang1213/Halide,smxlong/Halide,adasworks/Halide,kenkuang1213/Halide,kgnk/Halide,kgnk/Halide,adasworks/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,smxlong/Halide