fixed bugs with contents copying in recursive inclusion