Fix duplicated output of code chunk in attached section