Do not allow duplicated projects to be pushed onto the stack

Closes #1846