Bugfix in PortsMatcher involving iterator.

See #621