On the mechanism of thickness dependence of the critical current density in HTS cuprate epitaxial films