Fix namespace declaration

Hi!

This PR fix a bug with removing the whole `Program` (file) if namespace is a function or variable declaration.