Fix buffer overflow bug in shader mappings.