Simplify extra module variable handling

Change-Id: Ib9040b3706ee6c6ee15cc40db8586bccaf42fb38
Reviewed-by: Matti Paaso <matti.paaso@digia.com>