As soon as there are individual probes mapped to a gene that have NAs in the beta file, probeToMeanPromoterMethylation generates NA mean values for the entire gene.
I would suggest to replace
summarise_at(colnames(mappedBetasLong)[3:(ncol(mappedBetasLong))], mean)
by
summarise_at(colnames(mappedBetasLong)[3:(ncol(mappedBetasLong))], mean, na.rm=T)
which solves this issue by ignoring individual probes that give NA during the computation.