PROV-830, PROV-831 Implement applyRegularExpressions option; fixed hierarchy building when strict hierarchies are enabled