As per suggestion from Darren Gosbell I changed the way of solving this, to get better performance:
I created a new, hidden attribute where the key is only the second part of the composite key in the other attribute. Then I reference one single member of the new attribute hierarchy as the allowed set:
[Dimension].[AttributeHierarchy_hidden].&[592]