The bug that doesn't include lua code in blueprints when selecting new contents appears to be fixed now. Raiguard gave an update to https://forums.factorio.com/viewtopic.php?t=88100 in February that said it was fixed in 2.0.34. I tested a trivial example in the current release version, and it appears to work.