Yes, as long as the photographer is present in the portrait, it will be a self-portrait; it does not matter if someone else is also present.