SetParent() on object from Physics.OverlapSphere sets wrong position

When I use SetParent on a transform that I get from Physics.OverlapSphere, the position is not set correctly. The new child gets offset by the same numerical offset as the Parent world position it seems.
If I assign the child transform (or Collider) to a public variable SetParent works as expected.

In the Editor it looks like the child moves to the correct position first and then immediately gets offset.
Debug.Log only shows one call to SetParent().

This only happens when I use the collider from OverlapSphere, not if I manually assign the same collider to a variable.
I have checked with Debug.Log and it looks like it’s getting the correct GameObject, Transform, Collider etc.

This code is run in Update on the parent object:

Collider[] overlaps = Physics.OverlapSphere(socket.position, 0.1f);
foreach (Collider item in overlaps)
    if (item.gameObject.GetComponent<Grabbable>()){
        item.gameObject.transform.SetParent(socket, true);

“socket” is an empty child of the parent, where the object should get attached.
The Grabbable script is just an empty class.

So before the attach it looks like this:

ItemObject (Cylinder with Capsulecollider set as trigger)
ParentObect (Cube with rigidbody)  > SocketObject (Empty gameobject)

And after the attach triggers it looks like this:

ParentObject > SocketObject > ItemObject

ItemObject should be centered in SocketObject, but it gets offset instead.

Am I doing something wrong, or why does it behave like this?

I don’t think the code in general is wrong, since the problem only manifests if I use Physics.OverlapSphere, not if I assign the same collider to a public field.

Edit: v 2019.4.22f1

Now it seems the issues only happen if I change the position of the object in the Editor. I think the problem happened during normal game play initially, but maybe that was a different cause.

So bottom line is that the OverlapSphere acts weirdly if you move objects in the editor.