(bugfix) Query specification is not being cached or loaded when changing tables