Fix another autoident case (and add a test)
Merged 'develop'.