Fixes #3979: Trivial typo in memory.h
Fixes #3765: Move r29157 to v1.6 branch (check for negative np)