Merged with new-trap-decoding branch at rev a792088a3f04 (branch closed).