proper detection of with statements