Fixes the root cause for the crashes in vcldemo and ui-previewer that
indirectly were fixed by 0b7631bccb2a47ab71a0c1edbabe8a5892ff5f9c and
f5cfed29b05184894ec6ad2d14f73bff0b5a2783. Those two commits are now reverted.
Change-Id: If5dac37f032d2b74c977562c339e9799bbc4454c