Pass current bugs project id to version_get_id.

The project id passed to version_get_id should be for the current bug
in the loop as we may pass in ALL_PROJECTS