Searching for invalid func token fixed + relevant test added.