alis: move query.mask parsing to parse_alis()
alis: fix a memory leak I introduced