Chain exceptions

@dscho You OK with this? Particularly the first commit that changes `IndexItem`...