Rewrote Jo-Philipp Wich's patch so it applies to source files rather
than generated files.
Closes#701
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
This reverts commit edcad492e1.
Patch is broken and breaking build; reverting until I have time to
investigate.
Reopens#701Closes#889
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>