Fix bug 998346: Rebuild source document JSON on translate.

This is slightly hacky and ends up duplicating code, but the way the
rendering and JSON building happens currently there seems not to be
another option to force-refresh the parent doc's JSON.