Fix handling of attributes prior to compiling shader