I did what you suggested, but when I went to reboot my phone, the screen keeps blinking with the Motorola logo underneath.
The build.prop file didn't have the persist.debug.wfd.enable setting, so I added it before persist.sys.wfd.virtual=0
Before changes:
##property to choose between...