Minor bug fix in finalize_adjoint_sources.