Add vertex attribute specification restrictions

This eliminates undefined behavior from specifying vertex attributes.