Fixed AST for operator:: after template (#6195)