Fix error when adding ref with no snaks-order

If no snaks-order is passed the module dies
This no longer dies!

Change-Id: Ia9fe1bcd83ab97f8c6854e3cc567fd7241e3b986