BUG-10635: move up buffer close to earliest position
BUG-10635: coverity overreaction
BUG-10648 - regression: RoleHistoryWriter.ComparePathByName() sorts in wrong order