fixed regression in default naming of simple expressions

explicitly named expressions should get the name the user requested
added test cases
re-closes bug-671