BUG? Bounding box strange results

Hello,

I am having troubles identifying problem with my script which relies on bounding boxes.

I have a block definition which i need to deconstruct in order to get bounding box aligned to the longest curve in the block.

For different shapes it works ok but for this particular one i am getting bounding box which is off.

Try it. Components in the circle are the ones displaying the block, its oriented bounding box, definition plane and the longest curve. Note that bounding box cant even be baked due to some error despite displaying in GH.

When i tried the component with referended block instance from the rhino directly i obtained a good bounding box though. But together with efefront components i cant locate the error.

BUG bounding box.3dm (67.4 KB)

blocks oriented placement.gh (23.6 KB)

Thanks for help.