Fixes an issue with protocols in square brackets