Issue #3127838 by Lendude: In MediaLibrary the 'save and insert' is nested in code when it doesn't have to be (cherry picked from commit f89fcba5)