check context closure language requirements properly

closes PR 14346