Add test for correct restat logic

When a single output of an edge is dirty, the restat check should
leave all outputs of that edge dirty.