In the master section of the Proteus, there is a page that allows you to move programs to a different location without overwriting an existing program. I don't recall the page title but the parameters look something like:
186 > 40
Those numbers are just an example but what it means is that program number 186 will occupy the slot normally allocated for program 40. If you were to change location assignments following that example, and then scroll through the programs, the sequence of program numbers would read: ..38, 39, 186, 41, 42...
You can return programs to their original location by entering the original program number in each field (i.e. 40 > 40).
As for your programs not matching Cubebase, an original program may have been edited and assigned to that location, or it's possible the above mentioned parameters may have been offset by the original owner.