Fix error preventing error patterns being unregistered