Suppress warnings for patterns.

This seems to be triggered when the attribute is not set or some
corner case when the value passed is undef (this latter couldn't be
reproduced).