Fixed an error in doc processing for multiple languages.

This should address #1341.  Run dist/s_docs to test it.