Submitted by: Teppo Kansala (teppoka) See patch report for details of fixes. https://projects.blender.org/tracker/index.php?func=detail&aid=17500&group_id=9&atid=127 Note: the patch submitter's test files were quite nice, and would be good to have in our regression suite.