Why doesn't this code work to check if a region is occupied?
I have the code below in my theme to detect if there is a block in the `leftsidebar` region. The problem is that this HTML code still gets output on pages that do not have a block in the `leftsidebar` region. I am at a complete loss as to what the problem is. I do this same code with my other blocks and it works. 

Here's the code in my page.tpl.php file...

    <?php if (!$page['sidebar']): ?>
    <div id="content-area" class="one-col">
    <?php endif; ?> 

    <?php if ($page['sidebar'] && !$page['leftsidebar']): ?>
    <div id="content-area" class="two-col">
    <?php endif; ?> 

    <?php if ($page['leftsidebar']): ?>
    <div id="content-area" class="three-col">
    <?php endif; ?> 

Here's the block region in my .info file...
    
    regions[leftsidebar] = Left Sidebar
Why doesn't this code work to check if a region is occupied?
===

I have the code below in my theme to detect if there is a block in the `leftsidebar` region. The problem is that this HTML code still gets output on pages that do not have a block in the `leftsidebar` region. I am at a complete loss as to what the problem is. I do this same code with my other blocks and it works. 

Here's the code in my page.tpl.php file...

    <?php if (!$page['sidebar']): ?>
    <div id="content-area" class="one-col">
    <?php endif; ?> 

    <?php if ($page['sidebar'] && !$page['leftsidebar']): ?>
    <div id="content-area" class="two-col">
    <?php endif; ?> 

    <?php if ($page['leftsidebar']): ?>
    <div id="content-area" class="three-col">
    <?php endif; ?> 

Here's the block region in my .info file...
    
    regions[leftsidebar] = Left Sidebar