LUCENE-1825: Incorrect usage of AttributeSource.addAttribute/getAttribute leads to failures when onlyUseNewAPI=true