Stack maps: Handle special cases using flags. am: 697c47a7ff
am: 5cd9d59975

Change-Id: I44e3528e3d0a23a1b034da6d21f5c76ed50b1b5c