Link Reallocation Fix

Needs to be confirmed by others, but I believe I fixed the issues that
were happening with linking and link reallocation. The issues resolved:
- When a building has two of the same input, it is unable to accept
outputs from multiple buildings
- Reallocating to a building with a broken link does not reactivate the
building
- Occasionally link reallocation does not result in a new link line
being created