Well, I followed the above advice and installed a fresh instance of LB in a new folder, then added my MAME ROM folder (without any metadata, like I had done previously with the original LB). And it works! I have also added some metadata to some games and it works fine.
So what might be wrong with my original LB install? I don't want to have to install all my systems again, but I really want to add MAME.