Fix issue with Pattern replacement causing tracebacks.