[frontend] ReferencesManager: fix a race condition with the socket boot GitOrigin-RevId: cf21970bfc95128047d519b7c03ea0a29740174c