feature #2259: Fix error when the instance type does not exist
feature #2259: Do not include CONTEXT section if empty