Yep, a long time ago with filters for my M30. Same deal. Purolator claims they fit, but they were too long and had incorrect hole dimensions. I don't bother with Purolator any more. They may be OK for your Ford or Chevy, but I buy only OEM filters now. From Autohausaz they don't cost any more than Purolators from the usual automotive retailers, and they always fit correctly.

The problem you ran into is that somewhere along the line in the E34 540s BMW added the center support for the filter element. The earlier filters were Mahle and had a smaller ID. The later filters were from Hengst and had the larger ID. Since you have a later production car, you need the Hengst. It's about $8.50 at Autohaus and includes the O-ring and crush gasket for the drain plug.