Improve error report for pattern guards