Fixed overlay listbox sizing
Added warning for situations like that in issue #60.

Also improved the logic for frame discarding.