LUCENE-1623: fix case that was swallowing IOException; use .clear() instead of creating new ArrayList/HashMap