bugfix #1777 - attempt to read chapters in 'mdat'

This is mostly based on guesswork as opposed to any actual
documentation. Corrections to my approach are welcome.