Implement higher order aliases, closes #1678.
Test higher order aliases.