Fix a crash in the register allocator

The base for an indexed access can be a constant.

Change-Id: Icc529c02fb0ff2ac30d6f40088781b6ecfba81fc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>