Fix various bugs with pattern-based properties.