Ok, I found the real reason for this. I was setting the krt_prefsrc attribute on all routes exported to the kernel (to set the preferred source address), but when this is done on an unreachable or blackhole route, the kernel rejects it with an error. I have to *not* set krt_prefsrc for these routes.
This bug can be closed, and sorry for any wasted time! Pete