More prepared statement rewrites