When we have split the path into its components, we can end up
compressing them further. Make sure the list is actually mutable.
JIRA: YANGTOOLS-1125
Change-Id: I1d4cd66d2efbb1955bb189763ea09fefeba93d25
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
69cb7d1ab7a329e2bd19f538b3d598be91c49f2d)