Backporting DIRMINA-931 to 2.0