Fixed JS bug when duplicating a flexible content layout

https://github.com/AdvancedCustomFields/acf5-beta/issues/335
Signed-off-by: Elliot Condon <e@elliotcondon.com>