Bugfix: Document not marked as modified when application restored