Basic activity-alias support.

We have a few mistakenly failing tests that this patch can fix. Please take a look. Thank you.
nit: `if (v != null) {`