Ensure non-matching queries in layers aren't nullyfied when renaming a table