Fan-in linkage should not be allowed. For example:
stage1.link(stage2.link(stage3))
stage1.link(stage3) # This is bad.
In the second line above, link() method should detect that stage3 has already been linked as an output stage, and an exception should be thrown.