Raise error if port does not exist in R script

If an input/output port is not explicitly named, the R script is checked
to see if the variable is present in the script. If it is, it is treated
as though it was declared.

If it is not, it should behave the same as other activities when a port
is not explicitly declared (i.e. raise an exception). This commit ensures
the exception gets raised in this case.