Fix for key spec without primitive type. Tests for that.