We can remove the hack because https://github.com/flutter/engine/pull/8183 has been rolled into the framework.