Clearing HABTM (unique) when HABTM array is empty, refs #2461