Fix bug in location tracking of function properties

Closes #143