Correctly filtered bound variables (fixes #113)