Improved alignlayout so that it has more intuitive behavior when collapseparent is false. Created smoketest for alignlayout.