Warily treat an empty or invalid pattern (re #120 and #123)