Fix up for issue 6453 change, allow shared/synchronized invariants

But mixing non-shared/shared/synchronized is currently rejected.