Set $parentLen in contributions

Follow-up to I77dd45eb.

Bug: 56115
Change-Id: I17bd160577e6b287cc5a61e2a3b983b035c87f81
(cherry picked from commit 542caf6dd6c025ec5a35ec960d0df2442a152555)