fix statement doubling when implicitly returning an export