Constrained flow past cavitating bluff bodies