Dynamics of locking of peptides onto growing amyloid fibrils