I've been fixing the same problem on my side as well, in a simpler manner that obviates spark_bootstrap.js altogether, but there's no harm if you check this in for now.