Add an indexOf func from Angular src
Fix stepping func to match refactored directive vars