Sync with #25703 to load db-error.php template when needed. Fixes #17