modified find() to only share its allocator if a search was successful