Implementing `insert!`.