ensure variable structure is initialized before use (issue #5092)