libfoundation: MCRecord fixes.

Commit 48cace92fca6, merged in #1540, broke the build because I am an idiot.  Revert that patch and replace it by the correct fix.