conservative scope reference counting for if-statements