[BUG] Various dead-code injections lead to slight difference in image produced

Bug report and files:

https://github.com/mc-imperial/shader-compiler-bugs/issues/53

There are a few differences between the original (correct) shader and the variant (incorrect), which should not affect the semantics of the two. They are:

Added multiplication by "injectionSwitch.y" (evaluates to 1.0)
Added addition with "injectionSwitch.x" (evaluated to 0.0)
Wrapped a float literal into a ternary operator with pre-determined runtime control-flow based on set input
Added an unreachable "return" statement
  1. Operating system version.
    Ubuntu 14.04

  2. Graphics hardware.
    GK110 (GeForce GTX Titan), driver version 370.28

  3. Reproducer project.
    We have provided the fragment shader at the above link.

  4. Description of single steps to reproduce the problem.
    Render provided “variant.frag”. Custom built software used to identify this issue available for download at https://github.com/paulthomson/get-image/releases/tag/v-feb357fccce0694585b02484defc825778733751.

  5. Description of the expected result.
    Image visually identical to the original image.