I'm currently in some trouble with my phone.
Yesterday out of no thing I got the mentioned error "uids on the system are inconsistent you need to wipe your data partition"
My Moto G was only unlocked and rooted and basically Stock FW.
After I got this error I was like "well this sucks but ok" so I booted into the recovery (I pre-installed the recovery from the Cyanogen Mod thread) wiped it and booted again but nothing, the error still appeared.
So my next step was to try to flash a custom rom - I flashed CyanogenMod which ended in a boot loop. I flashed a stock firmware again aaaaand yes, the UIDs error was still persistent.
I also wiped the dalvik cache and the fix on the internet "use fix permissions in recovery" does not work as there is no such menu entry :/
So yeah, please help to resolve this this problem - I like my phone