BUG: Auto-layout issue in Overlay when using Variable Mode

When switching variable modes in an overlay the new values do not follow the autolayout rules.

I think this is a bug because closing and reopening the model will fix the autolayout issues. To fix this I included a duplicate of the modal and switch between them when changing the variable mode.

Let me know if anyone is interested in links or images.