fix #4826 ambiguous column name

fixes #5572
fixes #4826