core: improve out block detection in switch (issue #38)