fix imposing BCs to dense equations