Fixes bug 1383877

Also removes some obsolete code from the GET statement processing.

Has passed developer regressions and changes have been reviewed by
the Security team.

Change-Id: I4a02b0ddb3fcf612cd69c3e05bfe2f9952e6fe43
Merge "Fixes bug 1383877"