make sure we optimize for completion when we are in the good file (closed #2017)