As was explained in another thread, it's always a good idea to write your code so that it is case insensitive
. Apparently 2008 has alinetype value of "ByLayer" while 2009 has one of "BYLAYER" 
Code:
(vl-load-com)
(defun c:combinelayers (/ doc blocks blk eo layers lay)
;; Get the ActiveX object of the current dwg
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object))
blocks (vla-get-Blocks doc) ;Get the blocks collection
layers (vla-get-Layers doc) ;Get the layers collection
) ;_ end of setq
;; Step through all blocks (including Model Space & Layouts)
(vlax-for blk blocks
;; Step through all contained entities in block
(vlax-for eo blk
;; Get the layer the entity is placed on
(setq lay (vla-Item layers (vla-get-Layer eo)))
(vla-put-Layer eo (getvar "CLAYER")) ;Change the entity to the current layer
(if (= (vla-get-Color eo) 256)
;;If its colour bylayer, change it to overridden color to match
(vla-put-Color eo (vla-get-color lay))
) ;_ end of if
(if (= (strcase (vla-get-Linetype eo)) "BYLAYER")
;;If its linetype bylayer, change it to overridden linetype to match
(vla-put-Linetype eo (vla-get-Linetype lay))
) ;_ end of if
(if (= (vla-get-Lineweight eo) -1)
;;If its lineweight bylayer, change it to overridden lineweigth to match
(vla-put-Lineweight eo (vla-get-Lineweight lay))
) ;_ end of if
) ;_ end of vlax-for
) ;_ end of vlax-for
(princ)
) ;_ end of defun
Seems to now work