Correctly infer the heap region for non-standard link maps.

Resolves #1007.