fdo#33852 do not remove too much from the path

Change-Id: I1cf89f300530e761df5a287097d05f95d8af2017