Test case for #1575
Implement #1575

Conflicts:
	ext/flash/session.c