Prevent accidental calls to |write_mem(addr, &foo)|.

Resolves #883.