#22541 as_template_fields now raises an exception if db data is missing