Fixes #2687: table alias may not be respected when specified in relation query.