optimized nested begin expressions