This hasn't worked since AC10 -
http://archicad-talk.graphisoft.com/viewtopic.php?p=142526, but you will be pleased to know it is finally fixed in AC15!
Looking at the code, it was a very simple fix. Go to line 377 in the 3d code (It's quite near the end).
IF FlangePos=`Top` THEN
rotz 180
roty 180
!! ADDz -a !!Remove or comment out this line
ADDz -(a+dz+dz2) !!Add this line instead
ADDy -ds
ENDIF
You will have to save this modified object with a new name and leave the one in the AC library still incorrect, unless you want to extract out the whole library, swap out the object, then repackage it again. I'll leave this up to you!
Hope that helps.