Material pass and DoF don’t match
Pasting the correct answer here for visibility.

All ID passes (materials and object ID) by design are binary (a pixel can only belong to one object): developer.blender.org/T51121  This means you cannot use the ID passes when motionblur, depth of field, or transparency is involved.  In your case, you can use the dofocus node on the material pass to create the DoF as a postprocessing step, which CAN create a blurry mask for you to use.

For defocus to work correctly it needs to access the depth data. So you need to plug the 'Depth' output into the 'Z' input for the defocus node to correctly blur the image.