Your code has several issues. But the cause of the problem lies in this part (reformatted);
(cond
((= layrname "_Floor")
(cond
((= tst "INSERT")
(setq blockname (cdr (assoc 2 (entget (ssname sset ctr)))))
)
)
)
)
(cond
((= "Direction Ref Point" blockname) ; This returns T for items after the "Direction Ref Point" block.
(setq bpt (cdr (assoc 10 (entget (ssname sset ctr)))))
)
)
The bpt variable gets updated with point data from items processed after the block.
Consider this instead (note the use of 'and'):
(if
(and
(= "_Floor" layrname)
(= "INSERT" tst)
(= "Direction Ref Point" (cdr (assoc 2 (entget (ssname sset ctr)))))
)
(setq bpt (cdr (assoc 10 (entget (ssname sset ctr)))))
)