Yeah, I can tell. MAMEUI is hard coded to work with one ini directory, for various reasons.
The workaround I posted works. You just have to keep everything in the /ini folder, both ini's and presets, and keep the copies in the root and /presets folder for vanilla MAME. I haven't used MAMEUI to change game configs in a long time, so it's not affecting me so much.
With bgfx coming into its own, I think you have your work cut out for you (I would just ignore bgfx, if I were you).
Good luck to you if you do try to fix it.