Merge "Improved logic for determining visiblility of activities in the home stack"