Fixed problem with aggregate alias handling

Aliases of aggregate functions are no longer declared as undefined in
the header when main property has no link to another subject