Back out wrapping div in html template and use wrapping container in page template instead.
Sidebar variables are always set, so check for them being non-empty; not simply set.