Fix nullptr dereference.

A previous cl missed adding a return in the new path which could result
in a crash if the map info is null. Add the return back.

Added a new test to catch this case.

Bug: 166188440

Test: Unit tests pass. Verified the new test crashes on the old code.
Change-Id: I9420b47dae0f880493c0e6a60d97bb3468ff2906
2 files changed