Implement dirty logic
Implement dirty logic

All tests pass, but that is only because our test-suite doesn't exercise
anything that this change would affect.  That should be fixed.

kylehogan/hil,kylehogan/hil,henn/hil_sahil,henn/hil,apoorvemohan/haas,meng-sun/hil,SahilTikale/haas,SahilTikale/switchHaaS,lokI8/haas,apoorvemohan/haas,CCI-MOC/haas,henn/hil,kylehogan/haas,henn/haas,meng-sun/hil,henn/hil_sahil