As first this is not a bug !
The older revisions of C::B had a bug, that led to unusable projects, due to incorrect calculation of the projects common toplevel path. I fixed this in svn r7966, see
http://forums.codeblocks.org/index.php/topic,16322.msg110516.html#msg110516 for details.
The output name of an object-file is created from the source file with the path relative to the common toplevel directory of the project, not relative to the project-file's folder.
This relative path is used to create the output below the configured objects output directory.
You can avoid this by checking "Settings -> Compiler... -> Global compiler settings -> [your compiler] -> Other settings -> Advanced options -> Others -> Use flat objects", but this will lead to problems, if two source-files have the same name (obviously).
What might be misleading, is that the object output dir is relative to the projects base path (the path, where the project-file is, and not to the projects common toplevel path.
But as the path can be added with the "..."-button it should not be a problem.
Nevertheless, there s another issue with object files:
if the common toplevel path changes after the project is opened (by adding new files e.g.), the objects output path does not get recalculated.