[Core] Restore nix build. Also forget to remove one MANGOSASSERT + cosmetic stuff [c2079]

(based on commit [12588] - bcb98ed)