Fix issue with port check ordering

The link-free policy may modify the port, so do the port checking
extracted from the link terms at at the end of the link-free policy.

Closes #148.