Update how context _typeindex is set.