What should I have done?
Another point to consider:
In those conditions it isn''t hard to imagine in the middle of everything else a line going overboard (sheet, halyard, whatever). If your first action is to start the engine, even if it''s out of gear, you have set yourself up for the famous scenario of engine being stopped by line in prop. Won''t happen if the engine isn''t running. If you''ve developed a habit of relying on the engine to get you out of trouble, you''ve most likely neglected the habit of sailing out of trouble.