Fix for javascript error being thrown when a none quick-create lookups.
Fix to ensure lookup widget is destroyed when the dialog is closed.