Misc. fixes around attachment indexing, added some reporting and

Fix up attachment indexing and retrieval