Renaming with aliases generates invalid SQL fragment, resolves Issue 139