Fix BDict traversal in caps parsing