Is the Document API broken?

Fixed the problem - but your API as documented is broken @MArkWilliams