An old post but it still seems to be an issue when building binary packages. The following hack seems to work though (i.e., build source package and then build binary from that source package).
f <- devtools::build("mypackage")
system(paste0("R CMD INSTALL --build ", f))