Here is another awk solution, similar to @Thor's answer, less concise but more efficient:
awk '!NF {print;next}; !($0 in a) {a[$0];print}' file
With this, we only check a[$0] has existed or not. If not, initializing it then print. In this case, we don't have any reference, assignment to a[$0] if it existed.