layout: Stop racing on the JSManaged borrow flags

r? @jdm