fix bug 999102: Respond with 404 for $history where document has no revisions