Fix widget layout issue

When adding a widget to a container make sure it is properly queued
for reallocation.