Bug fix in the assembly of stiffness matrix for cohesive elements
(cherry picked from commit 1d49b1588918e1a8cf954a0780684af01aaeda8e)