Revert "loki: update to latest code from djrbliss (v1.9)"

This reverts commit 8883ed6b633529de4f831077340e3524478ddefe.