ignore regexp as attribute value in first_or

Details on problem are in  #3204