Fix skipped cleanup when context creation fails.