[BZ-1077208] preserve adapted objects identity in legacy api
(cherry picked from commit a1813362740761076f4a8de31ed50ef86126f88d)