fix bug with afui:ready not being dispatched if firstDiv is not found.

Fix bug where firstDiv is not properly set when selected="true" is not found on any panels