VE-594: fix cart item selection across the media insert dialog.
VE-594: a little cleanup to simplify error message logic
VE-594: refactor logic for adding/selecting cart items.