Process imports first, fixes #76