terraform: fix module output handling. Fixes #474