In-depth investigation of the origin, evolution and interaction of structural defects in YBCO nanocomposite thin films