Bugfix: support material and brim didn't work correctly. Includes unit test. #1074