Fix bug with downgrade permissions on first project assigment to team

Related to #3235 [Solution](https://github.com/gitlabhq/gitlabhq/issues/3235#issuecomment-14983729)