Update signature of arguments to defined()

The function passed in can take the index.
Merge pull request #2910 from jtlan/line-area-defined

Update signature of arguments to defined()