Fixes #5560: The directive form error handling is broken