Simplify the logic behind introducing captures into localinstscope