Fix unofficial message dependency generation.

Cherry picked fix from hydro to bugfix #12.